Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-06-17 14:01:11


 

>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of David A. Greene
>Sent: 17 June 2007 01:45
>To: boost_at_[hidden]
>Subject: Re: [boost] Progress of Boost.SVG_Plot
>
>On Saturday 16 June 2007 05:44, Paul A Bristow wrote:
>
>> >What's the advantage over individual function calls as Phil
>> >and others have suggested?
>>
>> Using the .axis_width().axis_color saves typing
>> (and makes it more compact and allows grouping)
>
>This is a poor reason to choose a design. I don't spend most
>of my time
>typing. I spend most of it maintaining what's already been
>written, and clarity is king.

Well it's your choice, but in C++ there are lots of examples of making things shorter to make them clearer (for example, not using
operator+(a, b) ;-)

Paul

PS The IS a downside to chaining though - it means that one can't use the name for a getter function - you can't get
myplot.axis_color() to return the color.
But I doubt if this is useful in this application - one is setting the plot parameters.


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