On 3/11/14 2:09 PM, SiegeLord wrote:
On 03/11/2014 04:52 PM, Brian Anderson wrote:
Fortunately, this feature is independent of others and we can feature
gate it until it's right.
I think that's the crux of the issue some have with this. If a whole
another, completely disjoint path for inheritance and dynamic
polymorphism is required for the sake of efficiency, then maybe trait
objects should go?
You still need them for Java `interface`-like functionality, where you
need to step outside the boundaries of single inheritance. Single
inheritance alone is too limiting. You can do C++-like multiple
inheritance in theory with thin pointers, but you lose runtime
efficiency doing it that way (double dispatch for finding fields) and in
practice people don't use multiple inheritance with the `virtual` in C++
very often for this reason.
Patrick
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev