Why was scope for allocating classes on the stack marked for deprecation?

Jeremy DeHaan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 17 09:56:48 PDT 2014


I'm curious as to why using scope to allocate classes on the 
stack was marked for future deprecation.

I mean, sure it could be potentially unsafe, but the new library 
solution (using std.typecons.scoped) does the exact same thing 
and is just as unsafe for the same reasons, is it not? I would 
rather continue to use the keyword scope instead of having to 
import another module in order to use this feature.



More information about the Digitalmars-d-learn mailing list