[Home]Put Add Options Ascii Args First - Program Options Suggestion

BOOST WIKI | RecentChanges | Preferences | Page List | Links List

Put add_options() ascii args first

Back to Suggestions - program options library


I would prefer if the order of args to add_options() were switched, like so:

    desc.add_options()
    ("help",   "produce help message", "")
    ("verbose","verbose output",              parameter<bool>("yes/no", &verbose))
    ("magic",  "magic value for the program", parameter<int>("value", &magic))
    ("word",   "internal parameter",          parameter<string>("whatever", &word))
    ;

It just seems more natural and readable to me. I guess because the 2 text fields are generally going to be relatively short and of well-controlled length, while the parameter<...> stuff can get pretty hairy and long.

    - People/Chuck Messenger


No opinion from me. Either way is fine, so it's completely up to reviewers.

   - People/Vladimir Prus


It's low importance to me, too...

   - People/Chuck Messenger

BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited May 22, 2003 6:27 am (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers