Mauricio Gomes wrote:
I am studying Boost Program Options library and I am curious, why was it choosen double dashes as the token to identify an option in the command line ?
Example: my_program --help
Would not a single dash be enough and less verbose ? What is the rationale behind that ?
POSIX recommends that a) options are preceded by a single dash b) that multiple options may follow the dash c) the options may come in any order In particular this implies the following would be equivalent: -h -e -l -p -help If one wishes to use long option names with a single dash only, one may encounter conflicts in determining what the option string means if some combination of one-letter options matches a long name of a particular option. Hence GNU then extended the POSIX conventions by requiring long option names to be preceded by two dashes. --> Mika Heiskanen