On 8/31/13 4:37 PM, Peter Williams wrote:
On 01/09/13 03:11, Andrei Alexandrescu wrote:
Haven't seen Tango's arguments parser, but it's a given getopt can be
improved in any number of ways. Yet the way I see it, with command line
parsing, the margin between a good enough argument parser and a terrific
one is razor thin. One parses arguments by definition once in every
program, and things like checking against limits and constraints across
multiple arguments can be easily done after basic parsing.


The Python Standard Library's argparse module
<http://docs.python.org/2/library/argparse.html> would be a good model
to base an improved option parsing module on.  I've used it a lot in
Python and it's very useful.

Peter

I remember sitting next to Kirk McDonald at the D conference in 2007 as he was showing me Python's argparse. I personally found pretty much any example we could think of more verbose and uglier than std.getopt.


Andrei

Reply via email to