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

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 17 10:16:16 PDT 2014


On Friday, 17 October 2014 at 16:56:50 UTC, Jeremy DeHaan wrote:
> I'm curious as to why using scope to allocate classes on the 
> stack was marked for future deprecation.

It was never implemented correctly (it is supposed prove it never 
leaves the scope, and is thus safe to be on the stack), so rather 
than keep a half baked feature in the language, the gang wanted 
to move it to the library where at least the usage wouldn't look 
as normal given the memory safety problems.


More information about the Digitalmars-d-learn mailing list