On 11/12/13 4:32 PM, Oren Ben-Kiki wrote:
Ah, thanks. I wasn't aware of that. I should start tracking that RSS feed...

I am very concerned that single-inheritance takes the language in the
wrong direction. I feel that a more mixin-oriented solution would better
match Rust's traits based type system. I posted a comment the blog entry
you gave, which I assume is a more appropriate venue than this thread...?

Your solution does not match the performance of single inheritance, because it has virtual method calls for every field access from the "outside" of the trait.

We don't want single inheritance because we're enamored with Java or anything, we want it because nothing that we've been able to come up with matches the performance that the prefix property on fields buys you. C++ code can be very fast for a reason.

We considered Go's anonymous fields but rejected them because they don't support virtual methods at the same time as field embedding.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to