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

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Oct 10 09:32:03 PDT 2012


On Wed, Oct 10, 2012 at 06:21:10PM +0200, Piotr Szturmaj wrote:
> H. S. Teoh wrote:
> >Then you could just write:
> >
> >	SHA1 sha1;
> >	// calculate hash
> >	sha1 = SHA1.init;
> >	// calculate hash
> >	...
> >
> 
> In my proposal reset() does exactly the same.

My point was that there's no need to remember that there's a method
called "start" or "reset", etc., when we can just use .init which is
common to all types in D. It reduces cognitive load.


T

-- 
EMACS = Extremely Massive And Cumbersome System


More information about the Digitalmars-d mailing list