Date: Sun, 7 Jul 2013 18:30:15 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Garrett Cooper <yaneurabeya@gmail.com> Cc: Jim Harris <jimharris@FreeBSD.org>, "src-committers@FreeBSD.org" <src-committers@FreeBSD.org>, Pawel Jakub Dawidek <pjd@FreeBSD.org>, Jilles Tjoelker <jilles@stack.nl>, "svn-src-all@FreeBSD.org" <svn-src-all@FreeBSD.org>, Bruce Evans <brde@optusnet.com.au>, "svn-src-head@FreeBSD.org" <svn-src-head@FreeBSD.org> Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol Message-ID: <20130707181851.E4398@besplex.bde.org> In-Reply-To: <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> <20130706184249.GD25842@garage.freebsd.pl> <20130706195108.GA34684@stack.nl> <20130707114237.L897@besplex.bde.org> <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> One minor interjection and I'll butt out of the discussion... >> .... >> In another thread involving Pawel, phk campaigns against errno and asks >> for error strings (even if they are only in English). Using perror() >> did this long ago for program termination, and using the err() family >> does it better. Except possibly for program suites -- translating a >> single numeric error is easier for programs than translating an >> unstructured string. I actually prefer using binary representations >> for programs. > > Your argument would be valid if computers were parsing output and putting it in more meaningful forms, but it's invalid when humans need to understand why things fail. Many devs who consume FreeBSD don't understand the concept of man 5 errno, and if they don't, I doubt end-users of FreeBSD (and its derivatives) will. That was more than half of my argument. perror() and err() give messages that are readable by humans. Extra info in exit statuses adds less than nothing for most humans. Some programs can parse it, but most can't. Sysexits is thus useless for almost everything. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130707181851.E4398>