-Andreas
[reassurance that we know about that argument
but still decided not to follow said practice]
[signature]
There is a reason, as I described in the bug.
Flags have proliferated to the point where 'long' names
are the common case, so we might as well drop the
- vs -- distinction and save some neurons.
Every time I have to type
hg mail -m foo --cc bar 123456
[note: - for first, -- for second, or else it fails]
I wish Mercurial were written in Go. :-)
As Brad says, this comes down to a matter of taste
more than anything, and as I said in my original reply,
I do hope someone will write a parser for the flag syntax
you want that actually has a nice, Go-like API,
and make it available via goinstall.
Russ
-rob
Just to cut this meme off, you can implement
-list item1 -list item2 very easily. See flagVar here:
http://golang.org/src/pkg/flag/flag_test.go#L164
Russ
Rhetorical question: which command line parsing library backs find?
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I never filed a patent.
ISTM that quite a few people are not keen on the flag package---I
certainly don't like it---as there are several alternatives available
from the Go dashboard.
I really wish that the Go standard library would adopt an option parsing
package that accepted the same command line arguments as GNU's
getopt_long() function.
I'm not saying this would be "better" than flag since that's a matter of
religious opinion, but it would at least be something that would work in
a standardized way and hold no surprises either for those programming
with it or for those using command line programs that make use of it.
This could be additional to the flag package and would be especially
convenient for those porting command line programs in C, C++, etc., that
use a get getopt_long() function (or similar) to Go.
[snip]
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"Programming in Python 3" - ISBN 0321680561
http://www.qtrac.eu/py3book.html
Then import a different flag package. It's pretty easy.
Russ