Boost logo

Boost :

From: Jake Voytko (jakevoytko_at_[hidden])
Date: 2007-06-27 07:43:38


> My opinion, FWIW, is that the layout you have is nice and intuitive.
>
> I specially like the way the chaining allows you to group various features
> together in a way that makes it easy to read.
>
> Although named parameters might be nice - and would have been really nice
> if they had been included in the original ++ when C was
> incremented, since the Standards people have not been persuaded to add
> names parameters to the language (because there are other
> more important faults, and there is trouble with mixing with positional
> parameters and defaults), named parameters remain unfamiliar
> to most users.

This was one of my concerns for whether or not I should use these.

So I would not get diverted to this unless the benefits are *really*
> compelling, and I can't see that they are. Your time is
> limited and despite your excellent progress, there is much to do :-)

Here's my case for why the benefits are compelling for plot_range(), if not
other functions. Each different data point could potentially be styled many
different ways. They could have their own shape, their own stroke color and
fill color, their own size, 2d graphs could have line styling, line
thickness, line color, whether or not there is a regression line, and
whether or not the curve of the data is interpolated, to name just what I
can think of off the top of my head.

Either I make one monolithic function that takes in all of these arguments:

plot_range(my_plot, data.begin(), data.end(), circle, blue, black, 12,
dotted, 2, black, false, false);

Or I create 5 or 6 plot_range() functions to take care of the combinations I
feel people will need. It looks nice so far because I've been purposely
picking and choosing what I implement in order to make it nice ;). The rest
of the functions I may not need it as much (or at all.. it seems to work
fine without named parameters), but I definitely need to come up with
something better for plot_range, because otherwise each new feature I add to
plot_range() will either make the number of plot_range() overloads jump up,
or make it that much harder to understand what's going on.

(There is also the potential downside of longer compile times and perhaps
> complications to get working with all compilers).

Noted.

Jake


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