Vote for the new std.hash (oops, std.digest)

Jonathan M Davis jmdavisProg at gmx.com
Sun Aug 26 09:42:32 PDT 2012


On Sunday, August 26, 2012 10:14:14 Andrei Alexandrescu wrote:
> How about this - use auto for code samples, but not for documenting
> function return types (except Voldemort)?

I tend to agree with this. If a function needs to return auto in order to be 
reasonable (e.g. it has to because of Voldemort types, it's return type is too 
complicated to _not_ be auto, or its return type varies), then it should 
return auto. Otherwise, we should probably be explicit about the return type. 
However, I think that the code samples should still generally use auto, 
because that's the style that we think should be used in actual code.

- Jonathan M Davis


More information about the Digitalmars-d mailing list