Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Program Options: Just curiosity, why double dashes ?
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-11-27 14:06:29


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 ?

Actually, it's the default style. See cmdline.hpp for a wide array of
tweaks you can apply.

The default style, actually, is the Unix style. It seems reasonable
to borrow the default style from an operating system family that is
known for fairly developed tradition of command line usage.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net