Rant after trying Rust a bit

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 24 17:49:39 PDT 2015


On 7/24/2015 2:27 PM, Tofu Ninja wrote:
> But thats exactly how normal interfaces work...

No it isn't. Google QueryInterface(). Nobody lists all the interfaces at the top 
level functions, which is that Rust traits and C++ concepts require.


> eg:
> interface Iface{ void foo(){} }
>
> void func1(Iface x){ func2(x); }
> void func2(Iface x){ func3(x); }
> void func3(Iface x){ x.bar(); } // ERROR no bar in Iface
>
> Only options here are A: update Iface to have bar() or B: make a new interface
> and change it on the whole tree. The same "problem" would exist for the
> concepts, but its the reason why people want it.

Sigh. Nothing I post here is understood.


More information about the Digitalmars-d mailing list