Subject: Re: [boost] [uuid] Interface
From: Vladimir Batov (batov_at_[hidden])
Date: 2008-12-23 18:27:12
>> the same -- 'm_uuid' initialized invalid -- but explicit about what it
>> actually does.
> I realize invalid vs nil/null was discussed earlier but I still don't like
> using those terms interchangeably.
I've been wondering where that "invalidity" property of nil/null comes from
for me? For me it certainly started with K&R stating "The symbolic constant
NULL is ... to indicate more clearly that this is a special value for a
pointer." That is, it was not just another but special pointer to start
with. Then, through many years, that "special" property has been firmly
ingrained for me as "invalid" due to
char* p2 = NULL;
char* p3 = "mama";
strlen(p1); // bombs
strlen(p2); // bombs
strlen(p3); // good
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().
Anyone with more descriptive suggestions?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk