Hacker News new | past | comments | ask | show | jobs | submit login

Null / nil is the gaping hole in the safety net of static typing. I dislike and distrust any language where null / nil is a thing. Yes, that includes SQL, which otherwise would be a great language.

At the same time, I've found Haskell to be too mind-bending to use for any but the most trivial of tasks. (Eg. monad pyramids and the most cryptic error messages in the history of CS!)

Fortunately I've found a language that covers all bases: OCaml. It has static typing with full inference; algebraic datatypes; eager evaluation by default (yes, I believe Haskell's default of lazy to be counter-productive); no null / nil value; fast compilation to machine code and to Javascript; a compact syntax; and good editor support, including a modern gofmt-inspired auto-formatter.




monad pyramid is also present in ocaml :) Both concurrency libraries are monadic.


Not with monadic let bindings [0]. They're not the prettiest but I think have a net positive effect on the code.

[0] https://github.com/janestreet/ppx_let


Haskell also has do notation built-in. In both cases you do need to "understand" what a monad is.


You absolutely do not need to know what a monad is to use do notation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: