Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-12-06 10:08:47


On Dec 6, 2004, at 8:57 AM, Caleb Epstein wrote:

> On Sun, 5 Dec 2004 15:10:36 -0500, Doug Gregor
> <dgregor_at_[hidden]> wrote:
>
>> The Named Parameters Library has been accepted into Boost.
>> Congratulations to the authors, David Abrahams and Daniel Wallin.
>>
>> The vast majority of reviews were positive, although most reviewers
>> requested additional documentation. Here is a list of the most
>> important/commonly-requested changes or additions to the library:
>>
>> - More documentation! Specifically,
>> + Automatic overload generation should go into the tutorial
>> + Document operator,
>> + Performance data (what's the cost?)
>> + Reference section
>> + "Best practices" section.
>>
>> - Add a metafunction for getting the type of a parameter, e.g.,
>> param_type<Params, width_t>::type.
>>
>> - Add test cases for the automatic overload generation macros.
>>
>> - Fix the BOOST_NAMED_PARAMS_MAX_ARITY bug; Cromwell Enage provided
>> a solution.
>
> There was also some debate about the syntax and implementation of the
> optional parameters. See for example this post from Dave:
>
> http://article.gmane.org/gmane.comp.lib.boost.devel/113589
>
> What is the final word on this?

The syntax will stay as it is. Some of the options proposed by Joel are
not workable (e.g., they cannot result in a compile-time error for
params[name] when a "name" argument was not passed) and the "superior"
option from Dave doesn't handle the common case where the type of the
argument passed by the user differs from the type of the default value.

The only unresolved syntax argument is the "f(foo = "wibble", bar =
17)" vs. "f((foo = "wibble", bar = 17))" question, where the former
requires lots of overloads (some people hate that) but the latter
requires the odd double-paren syntax (other people hate that). We won't
reach a decision on this, so there is no need to require changes to the
library.

        Doug


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