bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] null vs. `NUL byte'


From: Bruno Haible
Subject: Re: [bug-gnulib] null vs. `NUL byte'
Date: Tue, 29 Mar 2005 14:34:48 +0200
User-agent: KMail/1.5

Paul Eggert wrote:
> We should use the phrase "null character" or the abbrevation NUL only
> when we're talking about characters, not bytes.

But Jim _is_ talking about characters! The terminator of a C multi-byte
string is the NUL multi-byte character, It happens that this character fits
in 1 byte; therefore - in order not to confuse the reader - it's perfectly
natural to talk about a "NUL byte".

Please, let's use the "NUL byte" terminology in the context of C strings.
It's the most precise and readable that is available.

> POSIX uses the phrase "null byte"

It's less precise, because with this term you forget that you're dealing with
a character. "null byte" is also an adequate description for the elements of
  uint8_t foo[100];

> Or maybe just "'\0'"?

This is not pronouncible and hurts the flow of reading.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]