|
Boost : |
From: Jake Voytko (jakevoytko_at_[hidden])
Date: 2007-05-23 22:37:23
> my_graph.line_color(black).point_color(blue).x_range(-10, 10).y_range(0, 5);
Overall, I'm not against letting users use method calls to set
parameters of classes.. sometimes, that's what they're there for.
However, I don't feel that this is an alternative that is intuitive to
users. When a user normally does chaining, like
my_vector[0].to_string().find(...), they aren't expecting my_vector[0]
to be affected. However, show a beginner the longest cout statement
you can think of with as much chaining as you want and they'll
understand that it all affects the printout, even if they don't know
what a stream is! I feel that the stream operator chaining can
immediately be grasped by beginners, as they know that since it looks
like cout and file streams, it must affect a file somehow.
> 2 How can a set of plot settings be 'saved' for repeated use? Once one has chosen a plot style, line_color black, point_color blue
> ..., one wants to save this for re-use (though things like the range may change).
To be determined later :P. Maybe an XML file?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk