4 ms·
Why is the `using` keyword necessary, isn't the existence of a `[Symbol.dispose]` property enough? I.e. always call `[Symbol.dispose]()` when exiting the scope.
by mstade 3y ago
Why is the `using` keyword necessary, isn't the existence of a `[Symbol.dispose]` property enough? I.e. always call `[Symbol.dispose]()` when exiting the scope. Maybe have a keyword to not dispose the resource.
Seems the current design makes it very easy to forget adding the `using` keyword, leaving resources dangling.