3 ms·
Precious resource management is easier without pervasive sharing and with (modern) C++ or Rust style ownership. Most GC (or RC'd like Swift) languages end up at
by dbaupp 8y ago
Precious resource management is easier without pervasive sharing and with (modern) C++ or Rust style ownership. Most GC (or RC'd like Swift) languages end up attaching resources to their heap object type, with the free sharing that implies. Even in a reference counted implementation, code can squirrel away a strong pointer to keep a resource alive beyond it's obvious syntactic region, or keep trying to access after it has been invalidated.
Those languages do offer some tools and conventions that help, but they're typically opt in.