Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)
To: None <>
From: Christos Zoulas <>
List: tech-userlevel
Date: 10/26/2006 12:04:50
On Oct 26, 10:52am, (Thor Lancelot Simon) wrote:
-- Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)

| > The only thing it will be missing is floating point formats and this
| > can be noted in the man page. It is not like there are a lot of syslog
| > messages that use floating point numbers.
| I'm sorry, I think that introducing an exception to the standard format
| string rules like this is incredibly bad interface design, and documenting
| it really does not make it much better.  People already know how format
| strings work and are unlikely to consistently notice that you've written
| documentation (which they won't check, because they "know how it works
| already", which they're entitled to believe) that says this case is
| special.
| This is almost a paradigm case of how _not_ to change interfaces to
| software.  It would be much better to simply provide a new function with
| an interface that is not deceptively similar to one that people already
| know.

Yes I would agree, if we were talking about missing a lot of common
functionality it would definitely be a bad choce..  If you really
think that supporting the floating point formats is such a big deal
I guess we could use a different and async-signal-safe dtoa()
implementation instead of printing NaN.