Go and generic programming on reddit, also touches on D

dsimcha dsimcha at yahoo.com
Sun Sep 18 15:05:20 PDT 2011


On 9/18/2011 4:32 PM, Andrei Alexandrescu wrote:
> struct MyRange
> {
> ...
> alias length opDollar;
> }
>
> I do agree that most of the time this is what you want anyway, so that
> line would occur a lot of times...
>
>
> Andrei

The problem with this is that everything in std.algorithm and std.range 
would have to be manually changed.  I don't feel like doing this myself 
or waiting for someone else to get around to it.  It just makes a heck 
of a lot more sense to specify it in one place, in the compiler.


More information about the Digitalmars-d mailing list