Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2000 01:21:07 +0100 (CET)
From:      Marius Bendiksen <mbendiks@eunet.no>
To:        Marcel Moolenaar <marcel@cup.hp.com>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Dag-Erling Smorgrav <des@ofug.org>, Hajimu UMEMOTO <ume@mahoroba.org>, arch@FreeBSD.ORG
Subject:   Re: %a and %A formats
Message-ID:  <Pine.BSF.4.05.10012140114380.40957-100000@login-1.eunet.no>
In-Reply-To: <3A37CB39.C2E8AA67@cup.hp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Using indexes to refer to the arguments (vectors) has an advantage for
> i18n. The order of the arguments is related to the language and some
> translations produce better messages if the order of the arguments isn't
> fixed.

Indeed. An alternate mechanism would be to supply a (void *) key which
refers to the key, and have argument/property descriptors. But that is
overkill, I suppose.

> Other than that, I think I prefer a one line printf() over a 7 line
> say() anytime :-)

And most prefer a simple 'goto bad;' over a full switch statement to
handle errors. :). It is a matter of flexibility. Also, one introduces
a generic way to pass vectors and variable arguments w/descriptors.
I doubt code readability suffers. A number of subsystems could benefit
from this, esp. if the keying was used as well. Take the vnode ops,
for example.

Marius




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.10012140114380.40957-100000>