Painless Command Line Argument Parsing in C(github.com)
github.com
Painless Command Line Argument Parsing in C
https://github.com/sanjoy/CmdArgs
3 comments
It looks similar to args4j in Java: http://www.whenbrainsfly.com/2009/05/args4j-is-magic/
Basically same as GNU getopt which has existed 25 years? Please use standard libraries for things like this.
"The whole concept behind this is to have a very painless way to parse command line arguments, possibly by losing some flexibility."
Is "GNU getopt" painless? I suspect it depends on your definition of "pain", a pro/cons section would have clarified the rationnals for not using "getopt".
For sure it would be nice if people added a "prior art" comment whenever they reinvent the wheel.
Is "GNU getopt" painless? I suspect it depends on your definition of "pain", a pro/cons section would have clarified the rationnals for not using "getopt".
For sure it would be nice if people added a "prior art" comment whenever they reinvent the wheel.
I didn't see any mention of getopt in the readme, so I figured the author was perhaps just unaware of it. I don't consider getopt particularly painful myself, especially since you can use it on Unix-like plaforms out-of-the-box.
I hope the people downvoting my original comment do know what getopt is and that nearly all command line tools on e.g. Linux use it.
I hope the people downvoting my original comment do know what getopt is and that nearly all command line tools on e.g. Linux use it.
Software reuse is a great thing, but not to the point of criminalizing learning.