Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2001 09:24:22 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Jordan Hubbard <jkh@freebsd.org>
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>
In-Reply-To: <20010730084601N.jkh@freebsd.org>; from jkh@freebsd.org on Mon, Jul 30, 2001 at 08:46:01AM -0700
References:  <20010727214412.A91434@dragon.nuxi.com> <20010730084601N.jkh@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 30, 2001 at 08:46:01AM -0700, Jordan Hubbard wrote:
> From: "David O'Brien" <obrien@FreeBSD.ORG>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730092422.B59209>