General purpose library for name/value pairs.

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Jul 7 15:56:21 UTC 2013


In message <20130706194124.GE25842 at garage.freebsd.pl>, Pawel Jakub Dawidek writ
es:

>> Maybe the basic n/v should just do strings, and interpretation of
>> strings be a layer above ?
>
>It would make getting values from the nvlist a hell - dealing with
>strto* functions and checking if conversion succeeded, that just too
>complex. If you look at the functionality it doesn't look that bad.
>atomic(9) has the same "problem" with multiple types.

Which is why I'm not too happy about atomic(9) either :-)

In the end it is a deficiency in the ISO-C standardiszation
lacking ambition :-/

>> You know ?  Screw that!   Having usable errors only in english is
>> far better than having only "Invalid argument" in all the languages
>> of the world.
>
>Well, can't we do better than that? This argument goes both ways.

Indeed it does.

But I don't see anyone talking about translating everything that
goes into dmesg og syslog, so for now our kernel and systems functions
are english only.

Once somebody figures out the _method_ for handling those translations,
we can start to talk about it.

In the meantime, it would be a big mistake to restrict ourselves
to "Invalid Argument" for complex API's 

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list