Vladimir Prus <[EMAIL PROTECTED]> writes: > Rozental, Gennadiy wrote: >>> As my example above shows, you can use simple syntax >>> for two arguments and explicit/named for all >>> others. Take a look at Boost.Graph: it uses named >>> arguments, but mostly for numerous details such as >>> "color_map". You don't have to write >>> >>> transitive_closure(graph_param(g)); >> Unfortunately I am not familiar with Boost.Graph, but >> I believe that in >> specific case of CLA I would prefer one style for all parameter's modifiers. >> I do not see how description is more important that optional/required for >> example. Looking on your example I already confused: >> >>> desc3.add_options() >>> ("output,o", "file", "where to send output") >>> ("magic", "value", "magic value for the program") >>> .default_value("43") >> What is "file", "value"? Why do I need to supply >> default value as a string >> and not 43 itself? >> What is ,o? Do I need to remember everything that you will reply? > > You still need to remember something. For example, your library uses "," > to separate elements of std::list<...> parameter. Can I > guess that from the options declaration? Can I guess > what "multiplicable" is? > > The non 100% obvious notation in the above example is > ",o" for short option and naming the value for option. > > With yout proposal it would look something like > > parser << named_parameter<>("output") << > short_name<>("o") << value_name("file") << > description("where to send output") > > And it should be repeated for each option.
I don't have very much of use to say, but I like Vladimir's syntax much better, FWIW. -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost