From: Paul A Bristow (pbristow_at_[hidden])
Date: 2008-08-13 11:09:30
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Stjepan Rajko
>Sent: 13 August 2008 14:59
>Subject: [boost] [fusion][parameter] a solution for named
>parameters /parameter packs using fusion maps
>I just realized that named parameters can be implemented rather nicely
>using fusion maps (I'm not sure whether this has been explored
>before). I threw together an implementation for two particular
>parameters/names, but the method could be easily generalized. Here
>are examples of functions taking parameter packs
This looks neat and feels C++-ish (rather than IBM JCL - but you're too young to remember that ;-)
Jake Voytko and I concluded similarly when developing Scale Vector Graphics PLotting user interface where there are hundreds of
possible functions (x_axis_color(red), point_color(green)...).
(Watch this space for a enhanced and possibly useable version).
Chaining calls is convenient because you don't need to remember the order.
The compile time seemed a little better too compared to Boost.Parameter, and the setup more intuitive (C++y rather than macros).
Since it now clear that named parameters are not going to in the C++ language proper, I believe that this is best idiom to use.
Despite being unfamiliar, chaining is obvious once you get going with it.
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk