Is D 0.163 D 1.0?

Sean Kelly sean at f4.ca
Mon Jul 24 15:44:00 PDT 2006


Regan Heath wrote:
> On Mon, 24 Jul 2006 06:58:39 -0700, Sean Kelly <sean at f4.ca> wrote:
>> Chris Nicholson-Sauls wrote:
>>>  And I believe this is what is used in the new edition of C# for type 
>>> inference, yes?
>>
>> Yes, though 'auto' will be used for type inference in C++.  
>> Personally, I'd prefer scoped destruction to use a keyword such as 
>> 'local' or 'scoped' than to change the keyword used for type inference.
> 
> I'd prefer scoped destruction to simply omit the 'new' keyword, eg.
> 
> class A {}
> 
> A a = new A(); //normal
> A a = A(); //destroyed at end of scope
> 
> and with auto..
> 
> auto a = new A(); //normal
> auto a = A(); //destroyed at end of scope
> 
> Simple, elegant, obvious (IMO)

I like this too, though it doesn't address being able to label a class 
as 'auto'.  But perhaps that syntax can stay as-is?


Sean



More information about the Digitalmars-d mailing list