[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: [PATCH] reduce text(code) size and improve clarity of pkg_add
From: "David O'Brien" <obrien () FreeBSD ! ORG>
Date: 2001-07-30 16:24:22
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic