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

No wonder OCaml compiled to native is faster than other MLs and Python. I rem stumbling on benchmarks elsewhere, where compiled OCaml rivaled CPP in terms of performance on certain tests.

In my experience with OCaml, I have found the syntax a bit too unfavourable like the author did, but the resulting code was very fast. With concurrency sorted out, I wonder if it could take on Rust, Nim, and Go as far as systems-programming is concerned (esp since Go has the weight of Google behind it).

It also helps that the language designers have written a large tutorial on systems programming: https://ocaml.github.io/ocamlunix/

Then there's this epic Mirage OS built with Cloud Computing in mind by Anil and his team of OCaml zealots: http://openmirage.org/



I don't think anyone on the MirageOS team is a language zealot. Almost by definition, they'll be polyglots so understand the trade-offs you make when using different languages.

It turns out that OCaml is pretty good for systems programming, hence projects like MirageOS can survive and grow.


Agree. BTW, I meant "zealot" as a compliment.


Fun fact: the Rust compiler was originally written in OCaml.


It seems that many original compilers are written in OCaml.


What is it written in now? (Rust?)


Yup!


> With concurrency sorted out

The last time I looked at this (~ 2 years ago), there were a few efforts to solve this, but they all had lots of caveats and none were generally accepted as the solution. Has there been any progress since?

I tried to solve a performance issue with OCaml, and the lack of concurrency and librairies were too limiting.


There is a multicore runtime in progress, with an ETA of "when it's done".


Multi-core addresses parallelism, concurrency is a whole different can of worms.


Fair point. For concurrency, you have lwt and Core.Async. Lwt is fairly nice, haven't tried Core.Async. I'll point out that "there is no parallelism" is one of the traditional complaints about OCaml, not "there is no solution for concurrency".




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

Search: