std.digest: can we get rid of start() functions?

Marco Leise Marco.Leise at gmx.de
Wed Oct 10 08:16:38 PDT 2012


Am Wed, 10 Oct 2012 16:28:36 +0200
schrieb Johannes Pfau <nospam at example.com>:

> There's makeDigest which calls start for you, so you can write code
> like this:
> 
> auto sha1 = makeDigest!SHA1();
> //calculate hash
> sha1.start(); //start again
> //calculate hash...

Just this point, I think it adds mental bloat. It is
still easier to remember and shorter to use:

SHA1 sha1;
sha1.start();
//calculate hash
sha1.start();
//calculate hash...

-- 
Marco



More information about the Digitalmars-d mailing list