auto

mwarning moritzwarning at spam.web.de
Wed Jun 20 05:38:42 PDT 2007


Hoenir Wrote:

> I still can't get the purpose of "auto".
> I know it makes it possible to e.g. write "auto y = 4u;" but why not 
> just "uint y = 4;"?

"auto" is very usefull for cases like:

auto x = new MyNewClass!(Foo, Bar)();
or
auto y = getSomething();
doSmomething(y);




More information about the Digitalmars-d-learn mailing list