www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: auto

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);
Jun 20 2007