4 ms·
5 is an interesting choice, what is the downside to allowing `using` on non-disposable values, treating it like a no op disposer? Otherwise a function that take
by seniorsassycat 3y ago
5 is an interesting choice, what is the downside to allowing `using` on non-disposable values, treating it like a no op disposer? Otherwise a function that takes a maybe-disposable object parameter has to check if the symbol is defined, or the caller has to wrap the non disposable object
- bakkoting 3y agoBecause it's usually an error, and the benefit of catching the error cases outweighs the cost of losing that flexibility.
- seniorsassycat 3y agoWould be nice to include `guaranteeDisposable(x)` in the spec for cases you want to handle non-disposable values