bug-gnulib
[Top][All Lists]
Advanced

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

Re: gengetopt, anyone?


From: Jim Meyering
Subject: Re: gengetopt, anyone?
Date: Tue, 27 Sep 2011 14:50:55 +0200

Reuben Thomas wrote:
> I've just been playing with gengetopt. There's a lot to like: it gives
> me (potentially multi-language) options handling for one line per
> option (plus any extra text I want) in a simple .ggo file, and half a
> dozen lines of code (four of which really should be redundant as they
> test the help and version flags and call the relevant display
> routine). All the necessary variables to signal which options are set
> and their values are defined for me.
>
> The only thing really not to like is that for my simple six-option
> program it generates 565 lines of C. My program is only 140 lines,
> representing a roughly 500-line net addition when I use gengetopt. I'm
> not inclined to worry that much, but it does seem a lot.
>
> There's also a slew of minor issues, mostly cosmetic, and all easy to
> fix, for which I've filed a dizaine of bug reports and offered to fix
> myself.
>
> It should not go unremarked that gengetopt is big on gnulib (though
> one of the bugs I filed is that its manual overenthusiastically
> documents how to add gnulib to a project!).
>
> Has anyone else any experience with it? It would seem to have
> applications in, for example, coreutils, though its use would
> obviously be a fair amount of work and the quantity of code it
> generates might be more of a concern.

Hi Reuben,

"a fair amount"?
British understatement, surely ;-)

I suspect that you'll find many exceptions.

If we were starting coreutils development now, I'd be much more inclined
to use it, but it seems like the minimal benefit from that sort of
large-scale factorization would not be worth the effort. [not even
considering code size issues]



reply via email to

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