Hacker News new | past | comments | ask | show | jobs | submit login

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?




The most Haskell-like and popular are:

- http://www.purescript.org/

- https://github.com/faylang/fay

- https://github.com/ghcjs/ghcjs

- 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

Michael Snoyman gave a really good talk recently which covers GHCJS and Fay: https://www.youtube.com/watch?v=XfINRj5OzGw


PureScript has the advantage that it has a very lightweight runtime and maps to JS quite well.


js_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/ As it operates on the byte code you can put any ocaml into the browser, even the compiler itself.


Elm is worth checking out: http://elm-lang.org/


Where did you learn functional style programming? What resources do you recommend?


I use LiveScript. Sadly it's not typed. But with it's standard lib prelude.ls it makes a nice package.




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

Search: