Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to use a functional language on Unix, _and_ have a type system, _and_ avoid JVM/.Net then you don't have many choices. There is Haskell of course, but it is lazy by default, which makes it harder to reason about how your program will execute, and how much space it'll use. Rust is something interesting to keep an eye on, but AFAIK it is not ready yet for production use. Hence I prefer OCaml.


From the little I know of OCaml, Rust isn't really in the same category. While it has functional elements, it's really aimed at being a cleaner C++ (for instance, it doesn't have TCO).


Rust was originally implemented in OCaml, though. You're correct theyre not exactly in the same category, but there is influence there.


OCaml is a popular tool for implementing languages, IIRC the javascript referecence standard was implemented in ocaml as well.


Whops, no, that was actually Standard ML:

http://lambda-the-ultimate.org/node/1784


Why OCaml over ML?


I was shown some OCaml code at the university, so learning OCaml later seemed easier than Standard ML. Also I use Debian, and after a quick look at the repositories it has far more libraries for OCaml (-ocaml-dev) than for Standard ML, which tipped the balance in favour of OCaml as the language that I wanted to learn.

Why did I stick with OCaml after that? Mostly for two reasons: there are some libraries that I like (OCamlnet, Lwt, just to mention a few), and the community appears to be more active in recent years (lots of work on build systems, packaging, new libraries coming out, user meetings, etc.).

TBH I never followed the Standard ML community, so I don't know if its similar.


OCaml looks clearly more verbose/shittier to me, but I did learn SML/NJ first.

http://www.mpi-sws.org/~rossberg/sml-vs-ocaml.html




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: