Thread overview
[phobos] phobos commit, revision 1968
Sep 08, 2010
dsource.org
Sep 08, 2010
David Simcha
Sep 10, 2010
Philippe Sigaud
September 08, 2010
phobos commit, revision 1968


user: andrei

msg:
Fixed Zip, added SortedRange

http://www.dsource.org/projects/phobos/changeset/1968

September 08, 2010
  Looks good.  I like that Zip now uses a tuple instead of that ugly
oddball Proxy struct, and sort apparently will work with sealed containers.

One quick comment, though:  I thought that the separation between std.range and std.algorithm was that std.range operates on range topologies, while std.algorithm operates on elements.  Why are lowerBound and friends in std.range now?

On 9/8/2010 9:20 AM, dsource.org wrote:
> phobos commit, revision 1968
>
>
> user: andrei
>
> msg:
> Fixed Zip, added SortedRange
>
> http://www.dsource.org/projects/phobos/changeset/1968
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>

September 10, 2010
On Wed, Sep 8, 2010 at 16:07, David Simcha <dsimcha at gmail.com> wrote:

>  Looks good.  I like that Zip now uses a tuple instead of that ugly oddball
> Proxy struct,


Cool. That's good to know. Proxy didn't play nice with other algo/ranges. Zip is much better! Now, we can iterate on n ranges in parallel.

I'm looking at .back/popBack and wondering whether the behaviour should be different for the three length options. If you stop the iteration at the shortest range, back cannot just return the grouped backs from the input ranges. It must determine the shortest one and truncate the other accordingly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100910/bd2919e1/attachment.html>
January 02, 2011
I thought about where lowerBound and friends should sit, and there were arguments that could be made both ways. I'm still open if a solid tiebreaker comes about.

std.algorithm: algorithms operating on ranges
std.range: introduces range types

lowerBound etc: some of both.


Andrei

On 9/8/10 9:07 AM, David Simcha wrote:
> Looks good. I like that Zip now uses a tuple instead of that ugly
> oddball Proxy struct, and sort apparently will work with sealed containers.
>
> One quick comment, though: I thought that the separation between std.range and std.algorithm was that std.range operates on range topologies, while std.algorithm operates on elements. Why are lowerBound and friends in std.range now?
>
> On 9/8/2010 9:20 AM, dsource.org wrote:
>> phobos commit, revision 1968
>>
>>
>> user: andrei
>>
>> msg:
>> Fixed Zip, added SortedRange
>>
>> http://www.dsource.org/projects/phobos/changeset/1968
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
January 02, 2011
On 9/10/10 2:48 PM, Philippe Sigaud wrote:
>
>
> On Wed, Sep 8, 2010 at 16:07, David Simcha <dsimcha at gmail.com <mailto:dsimcha at gmail.com>> wrote:
>
>       Looks good.  I like that Zip now uses a tuple instead of that ugly
>     oddball Proxy struct,
>
>
> Cool. That's good to know. Proxy didn't play nice with other algo/ranges. Zip is much better! Now, we can iterate on n ranges in parallel.
>
> I'm looking at .back/popBack and wondering whether the behaviour should be different for the three length options. If you stop the iteration at the shortest range, back cannot just return the grouped backs from the input ranges. It must determine the shortest one and truncate the other accordingly.

Zip can determine the shortest range and truncate the rest only if all ranges support length and slicing.

Andrei