[getopt-sig] The bake-off

David Boddie david@sleepydog.net
Thu, 30 May 2002 10:16:13 +0100


On Thursday 30 May 2002 4:42 am, Guido van Rossum wrote:

> I read Greg's bake-off.
> (http://www.python.org/sigs/getopt-sig/compare.html)
>
> I didn't read the mailing list archives.  Has there been more
> discussion of the bake-off?

There was some discussion about the use of conflicting options, resulting from
the practice of aliasing commands. Whether things like "--verbose --quiet"
were allowable proved to be a point of contention.

> The bake-off mostly convinced me that
> Optik is the way to go for the standard library.  I have an idea for a
> second-order bake-off though.
>
> Greg writes:
>
>     One weakness of Ripoff's command-line interface is that several
>     flag options don't have a negative counterpart: eg. there is a
>     --keep-tmp option, but no --no-keep-tmp. That sort of thing really
>     is necessary in the real world, where a program's default
>     (no-keep-tmp in this case) might be overridden by a config file,
>     and then overridden again on the command-line. This weakness is
>     currently reflected in all three of my test re-implementations.
>
> As an exercice in how easy each of the three alternatives makes it to
> change the option set, I'd like to see each version augmented with
> this feature.  There may be no config file yet, so maybe the default
> values will have to be specified in a different way, like as globals.
> The code to add that shouldn't be measured for the comparison below.

So, you need each example to include the extra baggage which sets default
values.

Do you want to see implementations of mechanisms for validating types and
resolving option conflicts as well?

David



________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________