From owner-freebsd-hackers Mon Jul 30 9:24:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [206.40.252.115]) by hub.freebsd.org (Postfix) with ESMTP id AB25837B401; Mon, 30 Jul 2001 09:24:22 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.4/8.11.1) id f6UGOMP59589; Mon, 30 Jul 2001 09:24:22 -0700 (PDT) (envelope-from obrien) Date: Mon, 30 Jul 2001 09:24:22 -0700 From: "David O'Brien" To: Jordan Hubbard Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] reduce text(code) size and improve clarity of pkg_add Message-ID: <20010730092422.B59209@dragon.nuxi.com> Reply-To: freebsd-hackers@freebsd.org References: <20010727214412.A91434@dragon.nuxi.com> <20010730084601N.jkh@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010730084601N.jkh@freebsd.org>; from jkh@freebsd.org on Mon, Jul 30, 2001 at 08:46:01AM -0700 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jul 30, 2001 at 08:46:01AM -0700, Jordan Hubbard wrote: > From: "David O'Brien" > Subject: [PATCH] reduce text(code) size and improve clarity of pkg_add > Date: Fri, 27 Jul 2001 21:44:12 -0700 > > > I'd like to apply this patch to pkg_add which reduces the amount of code > > the compiler generates, and improves the clarity of the code. > > As the original author of this code, I'll just say that I favor > clarity over speed. Actually, it was the clarity issue that started this for me. When I saw s_strl*, I had to think "OK, what's *this* version of safe strl* doing?". A "grep s_strl *" didn't answer my question, so I had to go grepping over a larger area than just `.'. It was only after finding the definitions of s_strl* that I felt the extra abstraction was not justified from either a clarity or speed/efficiency position. I have had four private response to this diff (no one wants to open themselves to being flamed): 1. s_strl*() is an oversimplification. I agree with this diff. 2. if "size" ended up being a complex expression, I would rather the s_ version, but it wasn't complex 3. the extra layering is not warranted, I agree with the patch 4. in this specific case, it looked like Kris had some other agenda [referring Kris's objection to my original commit of this patch] And now one public one :-) 5. > I vote for the shortest one which has > the least number of private or otherwise "lesser known" functions > since that also obscures clarity. -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message