What is the correct use of auto?

Hans W. Uhlig huhlig at clickconsulting.com
Thu Apr 10 20:12:21 PDT 2008


I have been reading through the specification and playing with D more 
and more, what is the purpose of auto. I can understand in languages 
with scalar types handling datatypes on assignment but on a strictly 
typed language like C or D when would auto(as a variable declaration) 
provide more useful functionality then it removes from readability.

When would this be useful rather then simply specifying the type?



More information about the Digitalmars-d mailing list