Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How will pure functional languages impact the web? (PureScript and Elm)
4 points by hultner on June 12, 2017 | hide | past | favorite | 4 comments
I've lately had some experience functional languages targeting web browsers, such as Elm[1] and PureScript[2] which feel very native to the web. Then there's some pure Haskell Compilers such as GHCJS[3] and Haste[4].

So now I'm wondering how HN readers think this will impact the future web environment?

[1] http://elm-lang.org/

[2] http://www.purescript.org/

[3] https://github.com/ghcjs/ghcjs

[4] https://haste-lang.org/



They won't impact the web because they have no side-effects.

(Sorry, couldn't resist the joke.)


Just model this as taking an old, immutable web to a new one.

    impact :: Web -> Web
Persistent data structures will let us reuse the best parts of the old web efficiently.


In the short term, not much because there is a lot of inertia behind organizational programming knowledge, and the target runtime influences language choice (why JavaScript has become popular).

In the long term, I think expressive type systems will dominate programming. Simply because they allow programmers to provably generate correct programs without bugs. If the industry always used languages with a type system expressive enough to fit their needs, horrible errors like WannaCry would be eliminated (a classic buffer over-read due to programming with inadequate types). Of course, pure functional languages are at the forefront of type systems, though they aren't mutually exclusive (Rust for example).


Update: Links in the article isn't clickable so I've attached them below as well.

[1] http://elm-lang.org/

[2] http://www.purescript.org/

[3] https://github.com/ghcjs/ghcjs

[4] https://haste-lang.org/

------

I've previously been programming in Haskell and lisps before that so I have some experience with functional programming. From my experience the Haskell to JavaScript compilers aren't great in practicality as they provide a quite clunky developer experience and does not feel native to the web.

Elm and PureScript however integrates almost seamlessly and Elm in particular provides a smooth developer experience. I also find a nice resource[1] which eases the transition for a haskell developer.

Would love to hear your thoughts!

[1] https://github.com/eeue56/haskell-to-elm




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: