3 ms·
I don't mean to sound dense, but couldn't all resource management be automated to a large degree? It's not my area, so I am really asking, not trying to be a sm
by youdontknowtho 7y ago
I don't mean to sound dense, but couldn't all resource management be automated to a large degree? It's not my area, so I am really asking, not trying to be a smart a.
- steveklabnik 7y agoThat's what languages like Rust are trying to accomplish, yes. But it attempts to do so by unifying the systems used to manage these resources; what you're advocating is using GC for memory, which means you need two systems now: the GC for memory, and something for everything else. Languages like Rust say "that's too complex, let's use one system for all things."
- youdontknowtho 7y agoI get that, but why couldn't you use something like GC for resource management. Maybe I sound stupid here, but it seems like the kind of task that machines would be better at than humans.
- steveklabnik 7y agoYou can! The performance is not as good. For many applications, you don't have to care about performance. Rust is specifically designed to get maximum performance, so it can't be the default mechanism. (Swift basically does what you're talking about, for example)
- youdontknowtho 7y agoSweet. Thanks, pal.