Why don't other programming languages have ranges?

Sean Kelly sean at invisibleduck.org
Sun Jul 25 21:36:51 PDT 2010


Sean Kelly Wrote:

> So you can do ridiculous things like:
> 
> class A {
>     void put(List x) {}
> }
> 
> class B {
>     void pass(List<Integer> x) {
>         (new A).put(x);
>     }
> }

Change that to:

class A {
    void put(List<Integer)> x) {}
}
 
class B {
    void pass(List x) {
        (new A).put(x);
    }
}



More information about the Digitalmars-d mailing list