Re: D gc on local objects

2014-04-16 Thread Paulo Pinto via Digitalmars-d
Am 16.04.2014 18:51, schrieb Adam D. Ruppe: This is one of the things the `scope` storage class on local variables can do, but since it isn't implemented properly, it is not memory safe and thus its usage is deprecated. I really really really want to see scope be fully implemented, including not

Re: D gc on local objects

2014-04-16 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 16 April 2014 at 17:14:55 UTC, John Colvin wrote: I would love to have a "scope" that works properly, with or without blade-guards to stop me chopping off my hands when the function returns. The blade guards are the important part though: if you just want the allocation pattern,

Re: D gc on local objects

2014-04-16 Thread John Colvin via Digitalmars-d
On Wednesday, 16 April 2014 at 16:51:57 UTC, Adam D. Ruppe wrote: This is one of the things the `scope` storage class on local variables can do, but since it isn't implemented properly, it is not memory safe and thus its usage is deprecated. I really really really want to see scope be fully im

Re: D gc on local objects

2014-04-16 Thread Adam D. Ruppe via Digitalmars-d
This is one of the things the `scope` storage class on local variables can do, but since it isn't implemented properly, it is not memory safe and thus its usage is deprecated. I really really really want to see scope be fully implemented, including not allowing a reference to the variable to e

D gc on local objects

2014-04-16 Thread monnoroch via Digitalmars-d
I often see, that D developers say something like "remove allocations from std lib", and it seems, that the main reason to do it is eliminate gc calls. What about the idea, that local objects do not use gc at all? Maby, all temporary variables can be destroyed just like in C++, when out of scope w