5 ms·
I thank the lord every day that the language I work in (Javascript) supports functions! I try to write pure functions as often as possible, so it's easy to refa
by fdsary 12y ago
I thank the lord every day that the language I work in (Javascript) supports functions! I try to write pure functions as often as possible, so it's easy to refactor the code when I come back three months later.
But is there, except for Clojurescript, any true (like Haskell) FP language for browsers? Something that has the tools, and community to back it, so it's viable to actually make projects in it?
- grndn 12y agoElm is worth checking out: http://elm-lang.org/ http://elm-lang.org/
- kasbah 12y agoThe most Haskell-like and popular are: - http://www.purescript.org/ http://www.purescript.org/ - https://github.com/faylang/fay https://github.com/faylang/fay - https://github.com/ghcjs/ghcjs https://github.com/ghcjs/ghcjs - http://elm-lang.org/ http://elm-lang.org/ Each has it's own focus and strengths and weaknesses. There is a long page on the Haskell wiki on the subject: https://www.haskell.org/haskellwiki/The_JavaScript_Problem https://www.haskell.org/haskellwiki/The_JavaScript_Problem Michael Snoyman gave a really good talk recently which covers GHCJS and Fay: https://www.youtube.com/watch?v=XfINRj5OzGw https://www.youtube.com/watch?v=XfINRj5OzGw
- TazeTSchnitzel 12y agoPureScript has the advantage that it has a very lightweight runtime and maps to JS quite well.
- k__ 12y agoI use LiveScript. Sadly it's not typed. But with it's standard lib prelude.ls it makes a nice package.
- vegabook 12y agojs_of_ocaml let's you do ocaml in both client and server, and in a single app, with shared variables. http://ocsigen.org/js_of_ocaml/ http://ocsigen.org/js_of_ocaml/ As it operates on the byte code you can put any ocaml into the browser, even the compiler itself.
- KurtMueller 12y agoWhere did you learn functional style programming? What resources do you recommend?