Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-07 17:24:57

----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, February 07, 2002 3:50 PM
Subject: Re: [boost] Re: Policy-based vector? [was: Submission:
Fixed-Capacity STL Containers Library]

> > I'm a big fan of having named (or keyword) parameters in the language.<
> Me too. Unfortunately it's late to introduce named parameters in C++ now,
> because it's very liberal with the names you give to formal parameters in
> declarations...
> The only reasonable way now is to come with a keyword to substitute for
> non-trailing default parameters. The obvious candidate is "default"; I
> prefer a symbol (such as "?", "!") because "default" is quite a long word.
> Ah, I know! I got it! Let's use "static"!!!

I don't think positional defaults are a very good solution overall. Since
it's easy to write a template whose optimal design has more than 3 template
parameters, it can become very difficult to remember where things belong.
Emulating the "default" keyword with a real "default_" type in the unnamed
namespace is easy enough (well, achievable anyway), however I don't think it
sufficiently improves usability.


Boost list run by bdawes at, gregod at, cpdaniel at, john at