RFC on range design for D2

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Sep 8 20:46:57 PDT 2008


Manfred_Nowak wrote:
> Andrei Alexandrescu wrote:
> 
>>> 1)
>> There are numerous collections and ranges to be defined
> 
> You are right. A reversable range can be built with the designed 
> primitives. But this also holds for the `Retro'-type.

Indeed Retro was provided as a mere example and has no special status. I 
plan to add some more widely useful ranges, such as a circular range. 
Contributions will be appreciated (of course after the design gets frozen).

>>> 2)
>> I used these:
>> leftToLeft
> 
> Much better, but did you notice, that you used the directionless words 
> "beginning" and "end" to describe their semantics? That's why I used 
> "B" and "E". With directions in the names one might be forced to make 
> wrappers for not being irritated by the directions in case they do not 
> fit.
> 
> Ex.: Imagine a 4d-matrix in which a 3d-range is defined diagonally to 
> three of the axis of the 4d-matrix. What is left respective right of 
> such a range?  

Good point!

> 3) casting
> 
> On second read I miss some words about explicite and implicite casting 
> possibilities between the five types of ranges. 

Yes, I also mentioned that in a different post.


Andrei



More information about the Digitalmars-d-announce mailing list