From owner-cvs-all Sun Jul 22 23:35:28 2001 Delivered-To: cvs-all@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 8A36A37B408; Sun, 22 Jul 2001 23:35:16 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id D2E223E28; Sun, 22 Jul 2001 23:35:01 -0700 (PDT) To: Brian Somers Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil ecalloc.c emalloc.3 emalloc.c erealloc.c estrdup.c Makefile libutil.h In-Reply-To: <200107230223.f6N2Nfg14201@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on "Mon, 23 Jul 2001 03:23:41 +0100" Date: Sun, 22 Jul 2001 23:35:01 -0700 From: Dima Dorfman Message-Id: <20010723063501.D2E223E28@bazooka.unixfreak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Somers writes: > So we disagree. You believe these short functions bring consistency > to our code. I believe that they obscure things and make them less > portable. > > If anybody else wishes to chime in and express an opinion, now's a > good time. I've said my piece and won't push this any further unless > concensus says I should. Well, since you asked... I think functions such as these are useful for writing scratch programs where the only reason you want to check for errors is so if something goes wrong, you can tell the difference between a failed system call (or memory allocation) and a logic bug in your program. Stevens, W. Richard, uses functions like these (albeit with different names) in most (all?) the examples in his books. It does a lot to make the code more readable, but it's code that's being presented as an example, not for production use. In other words, a library with these kinds of functions would be useful as a port for consumption by people writing scratch programs which will never see the light of day. They certainly shouldn't be used in any production-quality programs, such as those found in our source tree. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message