Range Type
Janice Caron
caron800 at googlemail.com
Mon Mar 24 07:46:46 PDT 2008
On 24/03/2008, Craig Black <cblack at ara.com> wrote:
> Why would the type T and U ever be different? What's the point of the
> second type being different than the first?
Um ... I have no idea. I guess it's just to be consistent with the
fact that we can already declare:
opSlice(T lower, U upper)
with T and U being different. Maybe someone will find a use for it one
day. That said, it does at least allow you to use ".." in
declarations, as in:
int..int x;
x = 3..4;
and you have to admit, T..T is likely to be less typing (and look
prettier) than Range!(T). :-)
More information about the Digitalmars-d
mailing list