3 ms·
See but the issue is that humans are not perfect, and time is usually a resource. Without defer like mechanisms objects get leaked, mutexes held after return,
by bangaladore 2y ago
See but the issue is that humans are not perfect, and time is usually a resource.
Without defer like mechanisms objects get leaked, mutexes held after return, etc...
In a perfect world everything could be perfectly explicit as infinite time and energy has gone into ensuring nothing is forgotten and everything / every code path is well exercised.
Even then, scoped based resource acquisition / releasing still feels more ergonomic to me.