[Issue 14492] Deprecate scope for allocating classes on the stack
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 24 07:53:02 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14492
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to Jonathan M Davis from comment #4)
> (In reply to yebblies from comment #3)
> > As Jonathan said, it's used in DDMD. What we really need is a way to make
> > it @safe, not deprecating it.
>
> Why aren't you using std.typecons.scoped? In theory, at least, that's
> supposed to replace all uses of scope classes. But regardless, I don't see
> how you could possibly make it @safe without somehow guaranteeing that no
> reference to the object escapes, and I'd be surprised if you could talk
> Andrei into thinking that scope should stay. I'm not sure what Walter's take
> on it would be though. But it _was_ decided some time ago that scope classes
> were being gotten rid of, so it's not like this is new.
Let's fix scoped!() first. See Issue #10921
--
More information about the Digitalmars-d-bugs
mailing list