getNext

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jul 9 12:52:04 PDT 2012


On 7/9/12 3:30 PM, Mehrdad wrote:
> I agree. My alternative would be to abandon similar 'hasXYZ' stuff
> (which doesn't convey the picture and looks hacky), and instead formally
> define what those are, like I/O range. Sounds good/bad?

You may want to just spell it clearly.

So right now we have the notions:

input range (well one-pass range)
forward range
bidirectional range
random-access range
output range

coupled with the capability queries

isInfinite
hasAssignableElements
hasLength
...

The small set of ranges coupled with the capability queries reflect the 
orthogonal or near-orthogonal nature of such.

As far as I understand the above, you propose the notions:

input range
input range with assignable elements
infinite input range
infinite input range with assignable elements
forward range
forward range with assignable elements
...

That seems pretty onerous, but then I can't derive other meaning from 
your post.


Andrei



More information about the Digitalmars-d mailing list