Using consistently auto as function return type

Tommi tommitissari at hotmail.com
Sat Jun 16 02:31:32 PDT 2012


Do you consider it to be good or bad style of programming to use 
consistently auto as function return type?

One of the pros is that it saves some redundant typing when the 
function returns some complex templated type:

auto getValue()
{
     return MyType!(int, "asdf", 64).init;
}

But one of the cons is that you don't see what the function 
returns just by looking at the signature.

Are there some more severe issues that I'm missing?


More information about the Digitalmars-d-learn mailing list