2 ms·
I wish D had copied pythons with statement (without the scope escape) and not used the with statement for destructuring. The nicest thing: you can throw in the
by Paul_Diraq 8y ago
I wish D had copied pythons with statement (without the scope escape) and not used the with statement for destructuring.
The nicest thing: you can throw in the exit method without the runtime falling over itself.
- gmueckl 8y agoI totally missed that Python has this. This seems like the saner sibling of C#'s using/IDisposable construct. You can do a kind of RAII in D when you use structs instead of classes because these are stack allocated and have a suitable lifetime.