Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2003-01-18 13:20:21


"Alexander Terekhov" <terekhov_at_[hidden]> wrote in message
news:3E297852.F3A2F73E_at_web.de...
>
> Edward Diener wrote:
> [...]
> > the system for setting default parameters somehow being changed to solve
> > this problem, so that a user can override a default without having to
> > override all
> > default parameters but that doesn't seem to solve the problem in my
mind.
> > Something clearer and cleaner is needed but I don't know what it is.
>
> You might want to take a look at this:
>
>
http://groups.google.com/groups?threadm=199608081434.IAA07848%40ncar.ucar.ED
U
> (Subject: comp.std.c++: Default arguments)
>
> The "bottom line" was:
>
> ...why not provide an additional meaning for the "default" keyword...
>
> Well, the question/problem/suggestion didn't raise much attention,
however.

I am glad to see that others were aware of this limitation in C++ as long as
6 years ago. I thought the C++ template solution by Damian Conway was pretty
neat, but a keyword, maybe "default" as you suggested, might be better since
it eliminates a dependency on an external classes and lets the compiler
figure out what it is completely capable of doing easily. I definitely like
the simple solution of a keyword over named arguments or anything dependent
on names.

It is easy for the compiler to figure out default values in function calls
or template instantiations so using a "default" keyword should work pretty
transparently. But this discussion has little to do with Boost per se
anymore and should really be in comp.std.c++ instead. Nonetheless thanks for
pointing me to that long ago discussion.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk