[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: NULL vs. 0 (was Re: PATCH: flicker in startup identification)
From:       Harri Porten <porten () trolltech ! com>
Date:       2001-05-18 14:16:56
[Download RAW message or body]

On Fri, 18 May 2001, Guillaume Laurent wrote:

> On Friday 18 May 2001 14:44, Lubos Lunak wrote:
> 
> >  Hmm. Such a long patch for a one-line change. Is there any serious reason
> > why you want to replace all the NULL's with 0's ? It's the same.
> 
> Not quite, according to Stroustrup use of NULL is discouraged, 0 is 
> preferred. I think it's because NULL is typed while '0' is "more flexible" or 
> something like that. I don't have my copy of TC++PL 3rd at hand.

If NULL is defined to (void*)0 or something like that it's certainly
problematic as it specifies a type you may not want. I guess there might
be alignment issues in case you wanted a null pointer to a KHTMLPart for
example.

Harri.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic