Hacker News new | ask | show | jobs
by LiKao 474 days ago
Years ago when I was more active in the OCaml community there were lots of talks of Jane Street programmers (including those who first introduced OCaml there) about why they specifically chose OCaml.

FP provide type system that are really hard to emulate in other languages. Static type interference is easy to use and at the same time extremely powerful. Static type interference with algebraic types is even more powerful.

In addition OCaml has an absolutely pedantic type system. While ints may be implicetly coerced to a double in other languages, this kind of conversion will be rejected by the OCaml compiler.

Since Jane Street uses their code on the stock market for trading, they don't want to have tests showing their code is correct, they want definite proof. And OCaml can in fact provide that. If you write the libraries correctly, the compiler will prove the correctness of the code.

At the same time OCaml isn't as pedantic about coding paradigms as e.g. Haskell, allowing imperative and object oriented code as well. You could do similar proofs in Haskell but a lot of stuff is much harder to do in a language that is pure FP and not multiparadigm.