Out contracts: how to refer to objects' start state
Jonathan M Davis
jmdavisProg at gmx.com
Mon May 27 00:42:25 PDT 2013
On Monday, May 27, 2013 09:37:38 deadalnix wrote:
> On Sunday, 26 May 2013 at 00:43:36 UTC, Andrei Alexandrescu wrote:
> > That was technically difficult to do back then, and fell by the
> > wayside. Today it would break too much code to introduce even
> > if feasible.
>
> Can you expand more on the breakage risk please ?
If nothing else, it would mean that the variables inside of the in block would
not go out of scope when the in block ended, so their destructors would not be
called and the like, whereas now they would be. The same goes for scope
statements in the in block. I don't know how much of an issue any of that is
realistically though. But Andrei may have other reasons why it would be a
problem.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list