3 ms·
Without being an expert, I'm pretty sure that OCaml is more strictly functional than Erlang and Javascript, though they all support functional programming to on
by jon_dahl 18y ago
Without being an expert, I'm pretty sure that OCaml is more strictly functional than Erlang and Javascript, though they all support functional programming to one extent or another. With languages like Javascript and Ruby, you can program for years without really learning functional concepts. I think OCaml is the opposite; the paradigm of least resistance is functional, even though you can program in other styles (OO, imperative).
In terms of functional purity, Haskell > Lisp/Scheme/OCaml/ML > Erlang > Ruby/Javascript > Python > Java > etc.
- lg 18y agoI'd say Erlang enforces functional style more than Lisp does... there's no Erlang object system.
- IsaacSchlueter 18y agoTrue, it is virtually impossible to do much of anything in Erlang without using a bunch of little functions. Immutability is a harsh mistress, but one that I've already fallen in love with.