|
Boost Users : |
Subject: Re: [Boost-users] [Review] UUID library (mini-)review starts today, November 23rd
From: muhammadchang (kennethlaskoski_at_[hidden])
Date: 2008-12-03 15:19:25
>"behaves and cost, exactly the same as any built in type" and the
>"default constructor [...] generates a valid random uuid" seem rather
>opposed. int() is not a random int, it's 0. No fundamental type --
>no standard library type either, that I can think of -- has T() !=
>T(), yet you want uuid() != uuid().
You are right, there is an apparent contradiction in my wording above. By
"behaves and cost", I mean implementing comparison operators, inserters and
extractors, for example. Where applicable, of course, and with minimum
overhead. But an UUID is more than its bare 128-bit representation. IMHO,
what justifies the truly exceptional uuid() != uuid() is the "unique" in
"universally unique id".
Yours,
Kenneth
>And why is the random UUID generator deemed more important than the
>time-based one, so much so that it gets the default constructor?
Because Andy has not [yet] implemented the time-based generator, which poses
portability problems.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/-Review--UUID-library-%28mini-%29review-starts-today%2C-November-23rd-tp20652849p20820796.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net