3 ms·
Purely functional languages are a red herring. So-called impure languages however like OCaml can be enormously productive for certain classes of problem. As alw
by gaius 18y ago
Purely functional languages are a red herring. So-called impure languages however like OCaml can be enormously productive for certain classes of problem. As always, it's a matter of the right tool for the job. Too many people these days only have one tool, then every problem looks like your face.
- davidw 18y agoTime to ditch the 'tools' metaphor, IMO: http://journal.dedasys.com/2007/12/12/programming-languages-are-not-like-hand-tools http://journal.dedasys.com/2007/12/12/programming-languages-... Most programmers, realistically, don't use that many languages at any given time, and if they could use fewer, they probably would. The more territory a language covers, the better off it is... well, at least as long as it can do so relatively well.
- crabapple 18y agowhat can ocaml do that haskell can't? indeed these days its the other way around. the volume of submissions on hackage is far in excess of anything you see in ocaml land. on a language level they are equally capable, on a library level, haskell wins.
- jganetsk 18y agoAgreed. Languages like OCaml are actually higher-order imperative languages. They have a very rich, expressive system of "values". A value can be a function value, partially un-curried, and closed over arbitrary data. They can also be data values but can be arbitrarily complex. How many languages let you say: let tree = Node (Node (Leaf 3) (Leaf 4)) (Node (Leaf 7) (Leaf 8)) This value is constant, just like an integer or string constant in many languages. In other words, the right-hand side can be arbitrarily complex. And this data structure gets passed around in a very lightweight manner (by reference, not by copying). The Java notion that values are either primitive, or objects... is limiting.
- deleted 18y ago[deleted]