
On Tue, Dec 23, 2008 at 18:27, Vladimir Batov <batov@people.net.au> wrote:
For all practical purposes the above makes p1 and p2 quite naughty/bad/invalid compared to the well-behaving p3. Despite NULL's quite official status in the language(s), strlen() clearly "thinks" that NULL is anything but valid and bombs spectacularly. Then, I habitually extended that notion onto any foo::null() and ultimately to uuid::nil().
I don't really have any strong objections to your description insofar as it applies to char* in the context of "C Strings", but I completely disagree with extending it to uuid. find_by_uuid(uuids::nil()); and find_by_uuid(uuids::native_generator()()); will behave identically (assuming you don't have anything keyed by nil -- which you shouldn't -- and assuming you don't hit a collision -- which a time- and mac-address-based UUID effectively prevents). So how is nil any less valid? Your belief for char* comes from preconditions on common functions, so what functions (and thereby preconditions) are you using to apply the same reasoning to UUID?