On Fri, Apr 23, 2010 at 2:20 PM, Jason McIntyre <j...@kerhand.co.uk> wrote:
> On Fri, Apr 23, 2010 at 06:53:41PM +0200, Joachim Schipper wrote:
>> I noticed that vis(3) talks about "NUL terminated" strings, whereas
>> almost other sources (including e.g. strlcat(3), strtok(3), strpbrk(3))
>> talk about "NUL-terminated" strings (i.e. with a hyphen.)
>>
>> The following patch fixes this.
>>
>>               Joachim
>>
>
> quite a few pages talk about "nul terminate". let's try and be
> consistent - if there's a good reason, we can change them all. is there
> a good reason? i don;t know, because i always get lost on the idea of
> nul and null ;(

I see no reason to prefer hyphenated, but I'm modern like that.
Wikipedia tells me that the Oxford dictionary deleted 16000 hyphens
recently.

As for nul, null, NUL, and NULL, here's my view, as I come up with it.

NULL is the C constant.  It is a noun.
null is an adjective in the English language.

The C standard says nothing at all about nul or NUL.  '\0' is called
the null character.  [Basically, the C standard is written in English
and uses English words to describe things.]

As a practical matter, I think it makes (a tiny bit of) sense to
invent a new constant name NUL different from NULL.  But the
similarity does confuse people.  And nul is a made up word.  It
doesn't exist.  Can't use that.  But always using NUL is too hard on
the eyes.

I doubt changing things is worth the bother, but using
"null-terminated" or "null terminated" would be consistent with the C
standard.  I'd say the standard is pretty close to an unassailable
authority on C termiology.

Reply via email to