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

Gary Willoughby dev at kalekold.net
Tue Aug 28 14:50:23 PDT 2012


On Sunday, 26 August 2012 at 10:32:37 UTC, Mike James wrote:
>
> "Manu" <turkeyman at gmail.com> wrote in message 
> news:mailman.1410.1345976415.31962.digitalmars-d at puremagic.com...
> Looks good, though one thing annoys me as always throughout the 
> D docs, liberal use of auto can make them very difficult to 
> understand.
> auto result = hash.finish();From the examples where this 
> appears, I have absolutely no idea what 'result' could possibly 
> be and what I can do with it, and you're forcing me to go and 
> dig further for that information (waste of time).
> Surely there would be no harm in just writing the type there 
> for clarity?

I also find this very annoying. I'm trying to learn what types 
different methods return but i have no idea what is beneath an 
auto type. Explicit types would aid learning so much more! I 
understand the need for the auto keyword as a shortcut for 
productivity but you need to understand the underlying type 
before you're really comfortable with auto. I would like to see 
all examples in the language reference using explicit types 
purely for clarity.


More information about the Digitalmars-d mailing list