On Wednesday, 27 January 2016 at 14:22:18 UTC, Shachar Shemesh
wrote:
On 26/01/16 11:33, deadalnix wrote:
On Tuesday, 26 January 2016 at 09:16:47 UTC, Ola Fosheim
Grøstad wrote:
[...]
Now if one want to use that, D is very capable of doing it
already. Just
won't make it the default (like it is not the default in C++
either).
I bring it up every time the subject comes up, in the hopes
that at some point it will sink in.
No, D is not capable of doing it already. Without 100% reliable
destructors, RAII is simply not implementable.
D's destructors are not guaranteed to run on 100% of fully
initialized structs, which means that a RAII container has no
way to make sure its resource is actually freed. It is up to
the implementer. This eradicates almost all of the utility RAII
was meant to provide.
Shachar
Can you show a case where this happens?