[Issue 2070] DMD should allow easy creation of stack-allocated classes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 15 05:29:53 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2070
------- Comment #5 from brunodomedeiros+bugz at gmail.com 2008-08-15 07:29 -------
(In reply to comment #3)
> I think he was making a proposal. The same one, in fact, the only difference is
> "delete" keyword used instead of "scope".
> But foo(scope new Bar()) is far more intuitive than foo(delete new Bar()) to
> me.
I think:
new scope Bar())
might be even better. It makes 'scope' look more like a type attribute such as
const/invariant. Might be a direction worth looking into, but it's a deeper
change that needs more thinking.
--
More information about the Digitalmars-d-bugs
mailing list