Date: Sun, 07 Jul 2013 15:56:13 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: General purpose library for name/value pairs. Message-ID: <2869.1373212573@critter.freebsd.dk> In-Reply-To: <20130706194124.GE25842@garage.freebsd.pl> References: <20130704215329.GG1402@garage.freebsd.pl> <4818.1373008073@critter.freebsd.dk> <20130705195255.GB25842@garage.freebsd.pl> <60317.1373055040@critter.freebsd.dk> <20130706194124.GE25842@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20130706194124.GE25842@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@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2869.1373212573>