4 ms·
This is a really fascinating question. When I chatted with some of the Jane Street crew at NeurIPS they were adamant in the benefits of OCaml's Hindley-Milner t
by andrewnc 7y ago
This is a really fascinating question. When I chatted with some of the Jane Street crew at NeurIPS they were adamant in the benefits of OCaml's Hindley-Milner type system.
I didn't ask, but am curious, how that compares to the type guarantees of Rust? Would moving to Rust cause them to lose that advantage of compile time error catching? I've never written a line of Rust (hopefully that changes soon) so I don't know, but am certainly interested.
- smabie 7y agoOcaml doesn't have a HM type system. I mean I guess it does, but Ocaml supports a lot of stuff HM doesn't.
- mijoharas 7y agoTechnically the same is true of Haskell[0] but most people (myself included) will refer to the kind of type system used as Hindley-Milner for simplicities sake. (Both are more powerful though) [0] https://cstheory.stackexchange.com/a/30528/20014 https://cstheory.stackexchange.com/a/30528/20014
- throwaway720348 7y agoRust type's system has a similar power level to OCaml's but without modules (which are used heavily at JS) and with linear types/lifetimes. Rust would probably be a good fit for JS, but of course it takes a lot to overcome the momentum of 20 years of using primarily one language.