4 ms·
Ask HN: How will pure functional languages impact the web? (PureScript and Elm)
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/
- hultner 9y agoUpdate: Links in the article isn't clickable so I've attached them below as well. [1] http://elm-lang.org/ http://elm-lang.org/ [2] http://www.purescript.org/ http://www.purescript.org/ [3] https://github.com/ghcjs/ghcjs https://github.com/ghcjs/ghcjs [4] https://haste-lang.org/ 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 https://github.com/eeue56/haskell-to-elm
- itamarst 9y agoThey won't impact the web because they have no side-effects. (Sorry, couldn't resist the joke.)
- purescript 9y agoJust 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.
- dreamdu5t 9y agoIn 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).