3 ms·
OK, give me one that has: (1) A Hindley-Milner type system with type inference, (2) Native or JIT compilation with good runtime speed, (3) Easy-to-understand ex
by nine_k 5y ago
OK, give me one that has: (1) A Hindley-Milner type system with type inference, (2) Native or JIT compilation with good runtime speed, (3) Easy-to-understand execution model, and (4) garbage collection.
- OCaml has all of them, hands down. It is even getting reasonable parallel processing support as of recently.
- Haskell has beautiful implementations of 1, 2, and 4, but definitely not 3, which often leads to hilarious memory leaks.
- Rust has 1, 2, and 3, but 4, while possible, is not really ergonomic, and compile times are the longest.
- Typescript (with Ramda for kicks) has 3 and 4, and almost 3, but still not really 1.
- Java has 2, 3, and 4, but sadly not 1, and programming with immutable values is possible but the stdlib often resists it.