Range Type

Janice Caron caron800 at googlemail.com
Mon Mar 24 13:19:02 PDT 2008


On 24/03/2008, Frits van Bommel <fvbommel at remwovexcapss.nl> wrote:
>  > But just to be sure, let's ask the loyal readers of this newsgroup...
>  > Has anyone here ever used opSlice(T,U), where type T != type U? And if
>  > so, for what purpose, and could you live without it?
>
> It could probably be used with something like this:
>  <example of end-relative indexing>

You raise a good point. If we're going to allow

    auto x = 1..3;

then I guess we should also allow

    auto x = 1..$;

Exactly how that should implemented, I'm not sure - but if we get to a
solution, it will make ranges mighty powerful beasts!



More information about the Digitalmars-d mailing list