Rant after trying Rust a bit
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 25 20:42:23 PDT 2015
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();
}
More information about the Digitalmars-d
mailing list