Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-07-17 06:34:33


----- Original Message -----
From: "Daniel Frey" <daniel.frey_at_[hidden]>

> Although the focus seems to be the mathematician who uses the library,
> you should also keep in mind that programmers work with it. I even think
> that a team of mathematician and programmers will work on it together.
> Thus the above syntax - although possible - is a problem for all
> programmers at it looks like a bug. New programmers usually will start
> to try:
>
> int i;
> if( 2 < i < 7 ) ...;
>
> And will realize that this wasn't a good idea. It will also break the
> idiom of most people to always avoid code like the above. For the
> mathematician it will probably lead to further problem when they don't
> understand the internals and just look at the use of the library. They
> might think that they can also use it for other types and thus will
> create new bugs.
>
> I therefore suggest dropping the above syntax and look for other
> alternatives.

I have no problem with the notation on those grounds. One of C++'s
strengths is in finding new routes to expressiveness. People also get used
to the idea that a + b does an addition, but with Boost.Lambda, it builds a
function object

I'd like to suggest a small tweak, though:

Consider change range() to _range (or something similar). This would mirror
the use of _1,... _9 for lambda and bind. The thing is just a placeholder,
after all.

Regards,
Dave


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