Subject: Re: [boost] Formal Review: Boost.RangeEx
From: Neil Groves (neil_at_[hidden])
Date: 2009-02-27 11:54:38
On Fri, Feb 27, 2009 at 4:33 PM, Thorsten Ottosen <nesotto_at_[hidden]> wrote:
> Rogier van Dalen skrev:
>> Dear Neil,
> Many lazy adaptors are desirable. I would continue to add more as time
>>> permits. My focus is on producing a good foundation for this version. The
>>> reviews are giving me a clearer need of what people want from the
>> Fair enough. This will be fine if many reasonable algorithms can be
>> implemented within range_ex. However, could you state how you would
>> integrate lazy merge() or anything that takes two or more ranges in
>> operator| syntax? The function syntax would be:
>> merged(rng1, rng2)
>> I believe that the '|' syntax, however cute (I agree there!) is less
>> flexible and less obvious than the function syntax. Therefore, I think
>> the function syntax should be the primary one.
>> Currently merge(), transform(), and the set algorithms use output
>> iterators as a substitute for return values. Rephrasing them as
>> functions would also get rid of output iterators, which would improve
>> their interface.
> I tend to agree.
I agree too, so this change shouldn't cause any disappointment to anyone!
> E.g. an algorithm like transform(-) should return a range.
> Or perhaps we need a new syntax to enable
> rng && rng2 | transformed(binary_fun())
It seems that the '|' syntax is not much loved despite my deep affection for
it. I am becoming inclined to concentrate more on the function syntax and
just using the 'ed' convention.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk