Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-06-08 12:21:17


On Friday 08 June 2001 12:47 pm, you wrote:
> On Fri, 8 Jun 2001, Douglas Gregor wrote:
> > That's worse :(. Anything with "pointer" would be a mistake, IMHO. Maybe
> > "null" instead? Any objections to "null"?
>
> Why's that. I suppose I don't understand what you're trying to do with
> this nil. :)
>
>
> ----------------------------------------------------------------------
> Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
> Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
> Summer Manager, AT&T Research phone: (973) 360-8185
> ----------------------------------------------------------------------

The 'IMHO' was perhaps the most important set of ASCII characters in the
above message. It's really, really subjective :).

Nil/null is intended to mean "no value", "empty", or "invalid value" and not
"null pointer". "Null pointer" is reasonable when you're dealing with C++
pointers, shared_ptr, etc, but it is not quite as good for other cases. For
instance, 'function' isn't a pointer, it's a container of zero or one
function objects, so assigning "null_pointer" to it doesn't make much sense.
The empty set is often called "nil" or "null", and I'd like to pick up that
meaning as well.

Besides, anything with "pointer" in it requires at least 7 characters to
type. 'nil' is only three and 'null' is only four.

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk