Ask HN: How will pure functional languages impact the web? (PureScript and Elm)
4 comments
They won't impact the web because they have no side-effects.
(Sorry, couldn't resist the joke.)
(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).
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
[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
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/