On Saturday, 24 August 2013 at 00:45:46 UTC, H. S. Teoh wrote:
I've written up a proposal to solve the partially-constructed objectproblem[*] in D in a very nice way by extending scope guards:
[snip]What about a language rule, that for every type T destroy(t) must be valid if t == T.init?
Couldn't this problem be solved by using RAII and destructors? You would (only) need to make sure that every member is either correctly initialised or T.init.
