4 ms·
The biggest differences are that Haskell defaults to lazy evaluation and OCaml defaults to strict and that OCaml allows you to mix in imperative code without ex
by cageface 15y ago
The biggest differences are that Haskell defaults to lazy evaluation and OCaml defaults to strict and that OCaml allows you to mix in imperative code without explicitly using constructs like monads.
- getsat 15y agoThe monad in question: http://en.wikipedia.org/wiki/Haskell_features#ST_monad http://en.wikipedia.org/wiki/Haskell_features#ST_monad
- Drbble 15y agoSort of. It is more like every function in OCaml is in IO. There is just no purity guarantee anywhere.
- Hemospectrum 15y agoI think modules vs. typeclasses are a bigger difference. The Haskell approach to IO isolation would be much more horrible without exploiting features peculiar to the typeclass system. The IO system in early versions of Haskell did not exploit these features, and it was a disaster (http://research.microsoft.com/en-us/um/people/simonpj/Papers/marktoberdorf/ http://research.microsoft.com/en-us/um/people/simonpj/Papers...).