On Wed, Dec 3, 2008 at 00:21, muhammadchang
First of all, my opinion is that this kind of classes, sometimes called concrete types, are the very plus plus suggested by the language's name. A well designed user type behaves and cost, exactly the same as any built in type. [...] In particular, I don't like the "default null constructor". For me, the default constructor MUST generate a valid object, period. I have already copied/used Andy's code, which I luckily found in your vault, and one thing I changed was this default constructor [uuid_t uuid; // generates a valid random uuid].
"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(). And why is the random UUID generator deemed more important than the time-based one, so much so that it gets the default constructor?