isInfinite isInadequate

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Mar 12 04:23:56 PDT 2013


12-Mar-2013 14:49, monarch_dodra пишет:

> Up until not so long ago, it was not possible to slice infinite ranges.
> It is now possible. Unfortunatly, because RA ranges with slicing don't
> guarantee that r[0 .. $] is legal, things are still complicated in
> template code.

I thought it goes in opposite direction - slicing of Infinite range 
works only for ..$ slice. The chief new requirement of slicing is 
self-assign ability.
>
> The last point (IMO minor) that is raised in the thread is "runtime"
> infiniteness. EG: a range that may or may not be infinite at compile
> time, but which will be known at runtime. IMO, these a rare enough
> (arguably, inexistent) to not really matter. The workarounds are easy:
> 1) Make the range always infinite, but with a requirement that user must
> intialize it or whatnot.
> 2) Make a runtime fork that will call code that operates on a
> compile-time known infinite adaptor/subtype.


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list