auto: useful, annoying or bad practice?
Neia Neutuladh
neia at ikeran.org
Fri May 18 16:25:52 UTC 2018
On Friday, 18 May 2018 at 10:09:20 UTC, Chris wrote:
> In a way Java has slowly been moving in that direction anyway,
> cf. this answer [2] that reminded me of D's `auto` return type.
> [2]
> https://stackoverflow.com/questions/1348199/what-is-the-difference-between-the-hashmap-and-map-objects-in-java
Except the return type that you wrote in that case tells you
almost everything you can do with that value. If you specify the
return type of a function as `auto`, it tells you nothing. The
Java equivalent would be to return Object.
More information about the Digitalmars-d
mailing list