4 ms·
That really wasn't my intention -- it mostly makes sense to use Rust for the borrow checker. Instead my only intention was that it simplify the process of learn
by grok2 9y ago
That really wasn't my intention -- it mostly makes sense to use Rust for the borrow checker. Instead my only intention was that it simplify the process of learning Rust -- using all it's features (except the borrow checker), getting a working program fast and have some easy wins when learning Rust without stumbling constantly over the borrow checker. Maybe production mode could always enable the borrow checker.
- Lorkki 9y agoThe need for the borrow checker is driven by Rust's chosen resource management model. It sounds like what you really want is an optional mode with garbage collection, in which case I recommend you check out F#.
- vog 9y ago... or the "original", OCaml, from which Rust was heavily inspired.
- sitkack 9y agoF# is a superset of OCaml, one can program OCaml in F#, sorta [1][2]. [1] https://stackoverflow.com/questions/4239121/code-compatibility-between-ocaml-and-f https://stackoverflow.com/questions/4239121/code-compatibili... [2] https://stackoverflow.com/questions/179492/f-changes-to-ocaml https://stackoverflow.com/questions/179492/f-changes-to-ocam...
- thrasibule 9y agoF# is not a superset of OCaml. There are many things in OCaml that are not in F#. The second link you pointed out lists them.
- Manishearth 9y agoWhen folks complain about the "borrow checker" usually they're complaining about a superset of features including move semantics and how data works in Rust. This is far more deeply tied into the whole model of Rust and is frankly very core to the language, "turning it off" won't make it easier to learn, it will make it easier to learn a completely different language. Besides, all of this is necessary for soundness. Turning off the borrow checker won't magically get you a compiler that is less permissive, it will get you a compiler that will very likely produce nonsense if your program would have failed the borrow checker had it been present.
- gnuvince 9y agoThis is akin to suggesting that learning Java could be simplified by making its type system optional. Also, if one could turn off safety features, why would they ever switch them back on? They learned a different language, one where those checks are not present.