2 ms·
In my understanding traits (I guess you mean as defined in Rust?) are more powerful than interfaces in the sense that you can define them for objects from the o
by ThePhysicist 3y ago
In my understanding traits (I guess you mean as defined in Rust?) are more powerful than interfaces in the sense that you can define them for objects from the outside, but I don't see how you could use them to build dynamic-dispatch like functionality? Not an expert on traits at all though.
I think traits and interfaces are more supportive of a composition-like programming style, one might call that object-oriented but I still think it misses several key concepts of classical object-oriented languages.