3 ms·
> lots of languages with full H-M inference These are the ones that come to my mind: - ML family (Standard ML, Caml, OCaml, F#) - Haskell None of these are
by olsonjeffery 13y ago
> lots of languages with full H-M inference
These are the ones that come to my mind:
- ML family (Standard ML, Caml, OCaml, F#)
- Haskell
None of these are competing in the same space as Rust: fine-grained memory control (read: perf on par w/ C++) with zero-cost abstractions for safety.
You can certainly argue that all of those languages are as safe as Rust, with the lack of nulls and explicit mutability (taken to a new level in Haskel), but you can't say they expose a memory models that actually reflects the underlying system (and are as tunable) to the extent that Rust does.
- tel 13y agoRust implements a kind of region typing or linear logic, too, right? That's significantly beyond anything you'll see in garden variety Haskell/ML (though you can embed linear logic in the Haskell type-class machinery with a final encoding [0]). [0] http://okmij.org/ftp/tagless-final/course/#linear http://okmij.org/ftp/tagless-final/course/#linear
- pcwalton 13y agoYes to both. Lifetimes are basically regions, and unique types are basically affine types. (We usually stick to the C++ terminology, though, for familiarity's sake.)
- pjmlp 13y agoAlthough OS research is being done with OCaml by Xen Foundation and Cisco http://www.openmirage.org/ http://www.openmirage.org/