News for hackers. Stuff that matters.
Re:Abstraction without overhead: traits in Rust by pcwalton on Monday May 11, 2015 @04:23PM (#9527595)
Yes. The feature has been proposed for Java too: "defender methods".

Originally I resisted them on the grounds of not being necessary, but they're used all over now. Being able to supply a default implementation is extremely useful.

Re:Abstraction without overhead: traits in Rust by oldmanjay on Monday May 11, 2015 @04:32PM (#9527650)
Quick correction: Java 8 does have defender methods.
Re:Abstraction without overhead: traits in Rust by kzrdude on Monday May 11, 2015 @06:04PM (#9528152)
default method implementations makes traits behave like mixins, it's very useful (and it is a form of code reuse).
Re:Abstraction without overhead: traits in Rust by pcwalton on Monday May 11, 2015 @06:41PM (#9528325)
Totally agreed. I was wrong to resist them :)
Re:Abstraction without overhead: traits in Rust by EugeneOZ on Monday May 11, 2015 @04:39PM (#9527702)
Thanks to all for explanations! :) And now I think Traits are traits, but can be used as interfaces too :)