Boost logo

Boost :

Subject: Re: [boost] Formal Review: Boost.RangeEx
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2009-03-02 12:02:31


Dave,

> r | transform(f) | filter(g) | whatever(h)
> = whatever(filter(transform(r, f), g, h))

why this way around? Why not

whatever( h, filter(g, transform(f, r) )

which I don't find much worse than the operator| notation, and it works consistently with anything that expects functions, boost::bind, boost::function, whatever other people have already implemented that invokes operator(). I agree with Rogier that I don't see why ranges are so different from doubles, say, that would warrant introducing a new syntax.

And wouldn't concepts in C++0x allow augmenting Ranges with things that can be invoked method-style, like

r.transform(f).filter(g).whatever(h)

?

Arno

--
Dr. Arno Schoedl · aschoedl_at_[hidden] 
Technical Director 
 
think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany 
http://www.think-cell.com · phone +49-30-666473-10 · toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Charlottenburg, HRB 85229

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