On 24/08/14 15:14, "Marc Schütz" <[email protected]>" wrote:
In the "Opportunities for D" thread, Walter again mentioned the topics
ref counting, GC, uniqueness, and borrowing, from which a lively
discussion developed [1]. I took this thread as an opportunity to write
down some ideas about these topics. The result is a rather extensive
proposal for the implementation of borrowing, and its implementations:

http://wiki.dlang.org/User:Schuetzm/scope

I assume with this proposal it should be safe to do more stack allocations and have the compiler verify references don't escape the scope. Would there be a good idea to and a new function, besides the destructor, that will be called for variables declared as "scope" when they go out of scope.

The problem with destructors are that they can be called both when an object is deleted by the GC and when an object goes of out scope.

--
/Jacob Carlborg

Reply via email to