Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-11-24 18:18:53


From: Jesse Jones <jesjones_at_[hidden]>
> >At 03:42 PM 11/23/2000 -0800, Jesse Jones wrote:
> >
> > >>>6) Replaced NULL with 0 (Gregor says NULL was causing problems with
> >GCC).
> > >
> > >>>This change stinks. :-)
> > >>
> > >>Couldn't disagree more :-> NULL is, depending on your sensibilities,
> > >>either a C-ism or an MS-ism, but it's not generally considered part of
> > >>the received C++ style.
> > >
> > >You're painting with an awfully broad brush here. :-) Plenty of people
> > >think the way C overloads 0 impairs readibility.
> >
> >You may be right about overloading, but nonetheless Kevlin is correct that
> >"NULL [is] not generally considered part of the received C++ style."
>
> Readibility is, to me, one of the most important attributes of code and
> there's no question in my mind that "p = NULL" is more readable than "p =
> 0". I don't care of every member of the comittee frowns on the practice.
> I'll continue to use NULL outside of boost.

The problem is that the C standard allows for NULL to be defined
as (void*)0 in which case p=NULL will not compile as C++. It has
nothing to do with readability.


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