[Issue 8121] "scope ref" is perfectly OK

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Oct 13 22:53:36 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=8121

--- Comment #10 from Jonathan M Davis <jmdavisProg at gmx.com> ---
(In reply to Marco Leise from comment #9)
> As long as I adhere to the three rules above, `scope` _will_ magically start
> working. Quite some people are using `in` the same way.

I know, which is why I generally tell people not to use in whenever it comes
up. Its semantics are not properly defined and are subject to change.

You can do whatever you want with scope and risk having your code broken later
when scope is actually defined and implemented (though you could get lucky and
have used it in a way that's completely consistent with its future
implementation), but I strongly argue that there's no point in doing anything
with scope ref until the actual semantics of scope have been sorted out, and
I'll continue to advise folks not to use scope or in until it's been fully
defined and implemented because of the risk it poses.

--


More information about the Digitalmars-d-bugs mailing list