Rant after trying Rust a bit

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 26 15:59:07 PDT 2015


On Sunday, 26 July 2015 at 03:42:22 UTC, Walter Bright wrote:
> On 7/25/2015 3:28 PM, deadalnix wrote:
>> Also, argument from ignorance is hard to maintain when the 
>> thread is an actual
>> feedback from experience.
>
> You say that interfaces do the same thing. So please show how 
> it's done with the example I gave:
>
>     int foo(T: hasPrefix)(T t) {
>        t.prefix();    // ok
>        bar(t);        // error, hasColor was not specified for T
>     }
>
>     void bar(T: hasColor)(T t) {
>        t.color();
>     }

I'm not sure what is the problem here.


More information about the Digitalmars-d mailing list