std.uuid is ready for review

Johannes Pfau nospam at example.com
Wed Feb 8 09:38:16 PST 2012


Am Tue, 07 Feb 2012 00:00:26 +0100
schrieb Piotr Szturmaj <bncrbme at jadamspam.pl>:

> Johannes Pfau wrote:
> > Code: https://github.com/jpf91/phobos/blob/std.uuid/std/uuid.d
> > API-Docs: http://dl.dropbox.com/u/24218791/d/src/uuid.html
> 
> <snip>
> @trusted UUID shaUUID(const(char[]) name, UUID namespace = nilUUID);
> @trusted UUID shaUUID(const(ubyte[]) data, UUID namespace = nilUUID);
> </snip>
> 
> When casting from void[] to ubyte[] will be working in CTFE (if
> ever), you might use just one function taking const(void[]) and cast
> it to ubyte[] internally.
I'm not sure, most of the time you'd use the string version anyway and
in the few cases when you really want to use raw data a cast to ubyte[]
doesn't seem that bad.

> About name, I think it should be sha1UUID.

done


More information about the Digitalmars-d mailing list