Comment

Comment by seagreen

I've only written Haskell, but I'll try to give a fair shakedown from my perspective:

+ OCaml is eagerly evaluated while Haskell is lazily evaluated. This makes it easier to reason about things like memory use in OCaml.

+ IO is reflected in the type signature of Haskell functions. You may find this annoying because it stinks to have to change a lot of type signatures just because, e.g., you want one of your utility functions to make a log entry when called.

On the other hand, IO is often a huge deal either semantically or from a performance perspective. For big projects having IO reflected in the type system can be a huge help.

+ The ecosystems are different. Haskell's is bigger, though I've heard the quality of OCaml libraries tends to be very high.

parent seagreen 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton