Hacker News new | past | comments | ask | show | jobs | submit login

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.

Rust 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.

Ocaml doesn't have a HM type system. I mean I guess it does, but Ocaml supports a lot of stuff HM doesn't.

Technically 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

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