auto storage class - infer or RAII?

Walter Bright newshound at digitalmars.com
Sun Nov 12 02:30:35 PST 2006


Daniel Keep wrote:
> On a related note, I don't suppose I could ask you to take a second look
> at my old proposal on allowing auto objects to be returned from
> functions, could I? :P  It is one of the very, very few things I'd still
> like to see in D 1.0.
> 
> <http://www.digitalmars.com/d/archives/digitalmars/D/38329.html>

It's an interesting proposal. What I was thinking of eventually for 
'auto' is to generalize that it means that the value cannot escape its 
scope. An auto class member could then be destructed when the class was 
destructed; an auto function parameter cannot escape the function call, 
etc. But I haven't really thought about it very far.



More information about the Digitalmars-d mailing list