The review of std.hash package

David Nadlinger see at klickverbot.at
Wed Aug 15 01:24:56 PDT 2012


On Wednesday, 15 August 2012 at 08:17:14 UTC, Kagamin wrote:
> On Wednesday, 15 August 2012 at 08:13:27 UTC, Dmitry Olshansky 
> wrote:
>> AFAIK it'a method of HashAlgorithm Object.
>
> It's a minor design detail, see the example […]

No, it's not a »minor design detail«, at least not regarding 
what has been the topic of the discussion here – you can always 
provide a simple wrapper function in the proposed design and call 
it »stateless« as well (in fact, an implementation has already 
been posted, IIRC).

The point is that the ability to execute a hashing operation 
block by block is necessary, and that this operation is not 
analogous to reduce() because it potentially needs internal state.

David


More information about the Digitalmars-d mailing list