James Carlson wrote:
> Stefan Teleman writes:
>>
>> Darren J Moffat wrote:
>>
>>>> The sad thing here is that it's really the bug-ridden application code
>>>> that mishandles NULL pointers that's of poor quality, so it's not
>>>> OpenSolaris's reputation that should be at stake.
>>> Oh I agree completely but we are the odd one out here.
>> I apologize for interjecting in this discussion, but, wouldn't the character 
>> string "(null)" or "(nichts)" or "<NULL>" being printed on stdout/stderr act 
>> as 
>> a clear indicator of the bug, and of its precise location ?
> 
> Actually, no, it's not.  You know its apparent location in the stdout
> character stream, but nothing about where the problem might be in the
> code.

In other words, the fact that i see "(null)" instead of some other printable 
value, printed out, provides me with absolutely no indication as to which char* 
pointer was NULL, in the sequence of arguments passed to printf(3C) and friends.

That is because I do not have a reasonably defined set of expectations with 
respect to what *should* be the output of printf(3C) and friends.

Speaking only for myself: when i see the string "(null)" printed out, when in 
fact i was expecting "Giraffe", i do not think "Oh, the stdout character stream 
  contains the string \"(null\"). How odd. I wonder what could have caused 
this.".

I think "Why is Giraffe NULL, when it shouldn't be ?".

--Stefan

-- 
Stefan Teleman
Sun Microsystems, Inc.
Stefan.Teleman at Sun.COM


Reply via email to