bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARG_MAX


From: leslie . polzer
Subject: Re: ARG_MAX
Date: Thu, 26 Apr 2007 17:30:40 +0200
User-agent: mutt-ng/devel-r804 (Linux)

On Thu, Apr 26, 2007 at 10:23:33AM +0100, James Youngman wrote:

> I like your idea of separating the strategy (making decisions about
> whether to exec now and start again, or add this argument to the
> list) from the nuts and bolts of the implementation. Perhaps we couls
> separate the buildcmd.c implementation into the existing part that
> handles initial arguments, substitution, etc from the part that makes
> decisions whether or not to call exec now (which would need to be
> factored out). Perhaps something like this:-

It looks slick, but I'm not sure whether that isn't too much overhead
for the whole thing...  after all the different strategies really only
differ in one algorithm that has the same input and output.

The overhead lies in the function pointers -- why bother with them?
All algorithms (and we only have two in fact, and one of them is
distinctly better than the other) differ only in one function and will
happily operate with the same measure(), suggest_split(), ... functions
as well as the data structure you proposed.

So I'm not really getting the point of this indirection. :)

Separation is, in general, a good idea, though, and very C-like.

  Leslie

-- 
NEW homepage: https://viridian.dnsalias.net/~sky/homepage/
gpg --keyserver pgp.mit.edu --recv-keys DD4EBF83

Attachment: pgpuBRUZsiaOr.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]