Is D 0.163 D 1.0?

Regan Heath regan at netwin.co.nz
Mon Jul 24 15:42:46 PDT 2006


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)

Regan



More information about the Digitalmars-d mailing list