First class lazy Interval

Denis Koroskin 2korden at gmail.com
Tue Mar 3 09:57:55 PST 2009


On Tue, 03 Mar 2009 19:37:13 +0300, Tomas Lindquist Olsen <tomas.l.olsen at gmail.com> wrote:

> On Tue, Mar 3, 2009 at 5:22 PM, Don <nospam at nospam.com> wrote:
>> Joel C. Salomon wrote:
>>>
>>> Daniel Keep wrote:
>>>>
>>>> Yes, a..b is very nice.  It's also a bad syntax for intervals.  As Don
>>>> keeps pointing out, you can't have an interval that includes int.max
>>>> with that syntax.
>>>
>>> 4 .. int.$
>>>
>>> —Joel Salomon
>>
>> I love that real.$ is the number that's even bigger than infinity <g>.
>> What if the range is stored in variables?
>>
>> x[a..b];
>> How can you set b so that it includes x[int.max]?
>
> How about x[a..b] vs x[a..b+] ?

What would the signature of opSlice be in both case? Or different methods invoked? 




More information about the Digitalmars-d mailing list