Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-06-15 13:04:30


>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Joaquín Mª
>López Muñoz
>Sent: 13 June 2007 18:14
>To: boost_at_[hidden]
>Subject: Re: [boost] Progress of Boost.SVG_Plot

>> Personally, I still don't like the use of << at all.
>>
>> The set functions feel much more intuitive to me, and chaining
>> provides a shortcut if you want, but you don't have to use it.
>
>I think there's an advantage to the << interface that hasn't
>been mentioned
>yet: << allows extensibility in the sense that further elements can be
>seamlessly incorporated in the future without modifying svg_plot public
>interface. For instance:
>
>svg_plot& operator<<(svg_plot& p,const triangle& t)
>{
> return p<<line(...)<<line(...)<<line(...);
>}
>
>...
>
>svg_plot my_plot;
>my_plot<<triangle(...);

perhaps you can expand on this?

1 What is the value in avoiding modifying the public interface? Looking towards standards?

2 Can it not be done other ways? p.line(t1,t2).line(t2,t3).line(t3,t1)?

3 Are the set and stream methods mutually exclusive?

4 Could this be used even if the set method was used for other parameters?

Thanks.

Paul

PS Opinions are clearly divided on this issue. Should we try to get more views from elsewhere? But I don't want it to become a
bikeshed issue ;-) Anyway, showstopper/killer issues will probably emerge before too long in the project.

---
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