3 ms·
Why?
by ilostmykeys 10y ago
Why?
- klibertp 10y agoA sane, powerful type system is actually enough of a rationale and a selling point, at least for me. Also, allowing side-effects while still providing the mentioned type system makes it potentially much easier to integrate with existing JS code.
- cies 10y agoAnother reason for it being "much easier to integrate with existing JS code" is strict evaluation. Haskell is lazy, which means using GHCJS to compile it to JS produces code full of explicit thunks (think of promises). Both Elm and PureScript are compile-to-JS-languages that inherit a lot from Haskell, but not it's laziness.
- jackmott 10y agoYou should give one of the OCaml languages a try. OCaml or F#. They have some very pleasant properties. Generally this whole idea would make sense when you are writing a web application and you are using OCaml or F# on the server and want to use it for the client code too. Same justification for using node.js, but in reverse. But I know that the Ionide plugin for Atom and VSCode is written in F# compiled to javascript just because the developers like to code in F#
- ilostmykeys 10y agoI got downloaded for asking Why. Seriously sad.