On the question: Why Haskell and not OCaml: I choose Haskell instead of OCaml because of many small advantages, that won over Haskell’s problems (two non-working package managers, slow compiler, higher memory usage, space leaks, buggy LSP).
-
Data.Text
,Data.ByteString
,Data.Sequence
,optparse-applicative
and … are more comfortable to use than the OCaml versions (or I didn’t find better alternatives) - extensions like
ViewPatters
make the lexer and parser easier to read - I prefer using Typed Template Haskell to writing OCaml PPXs (OCaml syntax extensions). TH is useful to e.g. inline generic functions in tests and get all error messages of the test in the same place, instead of one at the location of the function and one in the test.
- being able to use stuff like “Trees that Grow” (PDF: https://www.microsoft.com/en-us/research/uploads/prod/2016/11/trees-that-grow.pdf) (or actually “Trees that Shrink” Trees That Shrink - Vaibhav Sagar by using strict parameters and
Void
just to “remove” constructors). I don’t know, if it really does help or results in more boilerplate, but so far I like it.