3 ms·
Fair enough. Can you turn off the gc/explicitly free everything? If not, then e.g. Go provides the same kind of memory management, i.e. controlling the layout o
by thirsteh 14y ago
Fair enough. Can you turn off the gc/explicitly free everything? If not, then e.g. Go provides the same kind of memory management, i.e. controlling the layout of objects in memory.
It would probably be helpful to define what I mean by memory management: controlling allocs and frees. If Rust provides this, great. (Sorry, I don't know Rust very well.) Then your plug is certainly warranted.
- pcwalton 14y agoYes, you can write code without ever using the GC. You have to opt-in to use the GC by using the GC'd types, which are not the default. Rust never implicitly promotes anything to the garbage collected heap. There's a compiler lint mode you can turn on that verifies that you don't ever use the GC. Allocation and freeing can be done manually, using unique pointer types (like std::unique_ptr in C++, except the compiler verifies that it's safe).
- thirsteh 14y agoVery cool. Thanks.