4 ms·
The simplest system to use is unrestricted references with some form of automatic garbage collection. If you decide that you want a type system that statically
by cwzwarich 9y ago
The simplest system to use is unrestricted references with some form of automatic garbage collection. If you decide that you want a type system that statically tracks resource utilization, why stop halfway at something that only partially solves the problem? I guess you could one-up linear types here and ask for a type system that makes all creation and destruction of information explicit, e.g. https://www.cs.indiana.edu/~sabry/papers/reversible-logic.pdfhttps://www.cs.indiana.edu/~sabry/papers/reversible-logic.pdf https://www.cs.indiana.edu/~sabry/papers/reversible-logic.pd..., but this is probably a more useful route to explore for a hardware design language than a software programming language.
- pcwalton 9y ago> If you decide that you want a type system that statically tracks resource utilization, why stop halfway at something that only partially solves the problem? Because there's a tradeoff between ergonomics and static guarantees. A hybrid system (in this case, static tracking of ownership combined with automatic resource destruction) is a valid choice to balance the upsides and downsides of each extreme.
- derefr 9y agoThe "point of Rust" is to be the simplest zero-runtime-overhead system to use.
- jcranberry 9y agoI'm not particularly educated in this issue, but if you're going to use a garbage collector, why not just use a language with a GC that abstracts away memory management completely? Like, what would be the advantages over Java?