On Mon, 21 Sep 2015 07:47:55 +0200
Otto Moerbeek <[email protected]> wrote:

> On Sun, Sep 20, 2015 at 07:43:46AM -0400, Michael McConville wrote:
> 
> > Otto Moerbeek wrote:
> > > I do not agree. You only have to remeber "that function does sensible
> > > error checking" and you do not have to remember at each spot which
> > > condition is the right one.
> > > 
> > > Function are the major way of structuring code, use them.
> > 
> > It's not the idea of functions that I'm questioning. I don't think
> > making a function for a simple if (x) then errx(...); condition is sane,
> > though. I'm a bit biased at the moment because I'm searching through the
> > tree for "creative" replacements for errx() et al.
> 
> If x is an expression involving relational operators, I do not like to
> see multiple copies of that. e.g. verifying if a condition should use
> > or >= is often hard enough. If I have to check that in multiple
> places, I'm wasting effort. Also, if I see a bug and fix it, I do like
> the fact that I do not have to check multiple occurrences of the same
> expression and decide if they are really the same or not.
> 
> So even if a function increases the number of lines in a program,
> often it reduces complexity.

We're all thinking about resulting machine cycles added on top of
visual code appeal, clarity and simplicity, right? There is also a
road map, while striking the right balance, one day "just another
OpenBSD user" will want the code to be of learning quality for his
kids. Locate is working OK as long as no new bugs creep in and
efficiency is kept, fuzz it.

Reply via email to