Boost logo

Boost :

Subject: Re: [boost] Formal Review: Boost.RangeEx
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2009-03-06 18:11:26

> That's indeed a real advantage to function call notation. On the other
> hand, we have libraries like lambda and phoenix that allow us to work
> with the operators in a similar way.

IMO, something as basic as ranges, really embellished iterators, still pretty close to the std library, shouldn't need something as fancy as Phoenix to be used properly.

C++ 0x lambdas will likely be a very popular feature, so we can expect a lot more code consuming functors in the future, all using operator() to invoke them. So in a way, operator() becomes even more special with C++0x than it used to be.

Don't get me wrong, I don't particularly like the function syntax, and I wish C++ would treat methods and functions more uniformly, so I can write rng.transform(f).filter(g). But it is not standard, and I fear the "unknown unknowns":-) later if we decide now for a non-standard syntax.

> You could do that today, but it's got the same coupling problem as named
> parameters in Boost.Graph and is solved by Boost.Parameter. Is there
> something in C++0x that causes decoupling?

You are right, doesn't work.


Dr. Arno Schoedl · aschoedl_at_[hidden] 
Technical Director 
think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany · 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, gregod at, cpdaniel at, john at