Range Type

Janice Caron caron800 at googlemail.com
Mon Mar 24 09:52:10 PDT 2008


On 24/03/2008, Xinok <xnknet at gmail.com> wrote:
>  This doesn't work:
>  int..int[]
>  Because, to me anyways, this translates to:
>  range!(int, int[])

Ah, you're right.

Well then, I guess we'll probably have to call it Range!, with both
type parameters beng optional. If both type parameters are omitted, it
defaults to size_t (or whatever is considered correct for array
indexing these days); if only the second is omitted, the second
defaults to the same as the first.

Given that most of the time you're declare it with auto, or infer it
from a range expression, that would certainly be acceptable.



More information about the Digitalmars-d mailing list