2 ms·
Just curious - what is the niche for this languages and what's the motivation to choose one?
by re-lre-l 2y ago
Just curious - what is the niche for this languages and what's the motivation to choose one?
- jasinjames 2y agoCompilers are a good one. I know Rust's original compiler (before being self hosted) was implemented in OCaml. Darklang's compiler was in OCaml as well.
- delta_p_delta_x 2y agorustc targets LLVM IR by default, and I daresay the bulk of the optimisation and assembly-lowering work is done in LLVM. Which is solidly C++.
- chongli 2y agoThey’re not meant to be niche languages. They’re meant to be general purpose languages. They’re trying to use functional programming to achieve a high degree of correctness with short, readable programs.
- johnisgood 2y agoNot niche, Jane Street uses OCaml (and they contribute a lot to the compiler, too), it is "a research-driven trading firm where curious people work together on deep problems". More about it here: https://www.janestreet.com/what-we-do/overview/ https://www.janestreet.com/what-we-do/overview/
- delta_p_delta_x 2y ago> where curious people work together on deep problems 'curious people': people who got jaded by academia and were attracted by the six- to seven-figure salaries at Jane Street. 'deep problems': Buy X units of Y instrument at A exchange, and sell Z units of said instrument at B exchange, and do this often enough that said company makes a pile of money for itself and its employees (mostly itself, given it can afford to pay its employees six to seven figures).
- johnisgood 2y agoJane Street is just one example, OCaml is widely used elsewhere, too. For example, the first compiler for Rust was written in OCaml, too. I mentioned Jane Street because it uses OCaml for high-frequency trading, and because they are huge contributors to OCaml.