Open planetis-m opened 3 years ago
The reason is simply: no one stepped up to do it yet. So I decided to crack on it with my experimental nim-sys package. I have uncovered some very annoying destructors bug though (all reported).
Ideally streams don't need destructors. Instead the lower-level primitives should have them, which will propengate the destructor to anything wrapping it, for example a FileStream
wrapping File
will inherit File
destructors automatically.
It's not an original idea, it was proposed by @Araq before, that automatic closing of resources can be made with destructors. But for some reason there wasn't any activity on it. Would it be ok to start as a first phase, the implementation of destructors for the
streams
module?. Any technical limitations or bugs blocking this task?