From owner-freebsd-arch Wed Dec 13 16:21:29 2000 From owner-freebsd-arch@FreeBSD.ORG Wed Dec 13 16:21:27 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id DB47937B404 for ; Wed, 13 Dec 2000 16:21:26 -0800 (PST) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id BAA72452; Thu, 14 Dec 2000 01:21:08 +0100 (CET) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id BAA41035; Thu, 14 Dec 2000 01:21:07 +0100 (CET) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Thu, 14 Dec 2000 01:21:07 +0100 (CET) From: Marius Bendiksen To: Marcel Moolenaar Cc: Poul-Henning Kamp , Dag-Erling Smorgrav , Hajimu UMEMOTO , arch@FreeBSD.ORG Subject: Re: %a and %A formats In-Reply-To: <3A37CB39.C2E8AA67@cup.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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