Boost logo

Boost :

From: jk_at_[hidden]
Date: 2001-06-08 23:28:54


8 Jun 2001 21:14:00 +0400 Beman Dawes ÎÁÐÉÓÁÌ:
>One further problem is that when it is discovered that a library contains a
>nil or null or other 0 replacement, all further discussion is about that
>replacement. The library itself recedes into the background.
>
>It seems to me that 0 replacements polarize people with hardly any
>benefit. You might be able to defuse some of the discussion by changing
>the name to something less likely to act as a lightening rod. But that is
>about the best you can hope for.

IMHO it is quite unimportant what name literal has - nil, null, nothing or
smth. What is important, it is *type* boost::nil_t; then one could write

namespace boost {
        struct nil_t { nil_t() {} };
        const nil_t nil;
}
      
using boost::nil_t;

int f(nil_t);

namespace {
        const boost::nil_t null;
        const boost::nil_t nothing;
        const boost::nil_t nobody;
}

f(boost::nil);
f(nil_t());
f(nothing);
f(nobody);

The name "nil" is totally unimportant.

-- 
jk

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