Ranges with length that cannot be named

John Colvin john.loughran.colvin at gmail.com
Wed Sep 18 19:21:23 UTC 2019


On Wednesday, 18 September 2019 at 19:10:43 UTC, berni wrote:
> We are used to divide ranges in two: Ranges with length and 
> infinite ranges. But there is something in between. Some ranges 
> have a length, that does not fit in an (u)long and therefore 
> cannot be named in D. The same might be the case, when the 
> calculation of the length is somehow problematic.
>
> [...]

Maybe I'm misunderstanding, but are you missing that you can just 
not define the length member? Then your range doesn't have a 
defined length (it might be infinite, it might be length 0, it 
might 2*ulong.max).


More information about the Digitalmars-d mailing list