[getopt-sig] More about commands on the command line

Russ Cox rsc@plan9.bell-labs.com
Tue, 12 Mar 2002 11:47:47 -0500


Most of our disagreement is philosophical, so I don't
really expect to reach any sort of consensus here.

However, this is just false:

> If you have a lot of commands, and thus a lot of sub-parse runs, you end up
> creating a lot of lists. Clearly, the processing package should deliver a
> one-shot parsing solution in these cases.

Why?  Is argument parsing really the bottleneck
in your applications?  It's not in mine.  Further,
assuming that the option parser gives you back the
list of unparsed command arguments, you're already
holding the list you need -- you don't even have to
write lots of code.  List slices are cheap.  This is a
non-issue.

Russ