June 20, 2007 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);
|
Copyright © 1999-2021 by the D Language Foundation