News for hackers. Stuff that matters.
Re:Abstraction without overhead: traits in Rust by GolDDranks on Monday May 11, 2015 @04:22PM (#9527585)
> Traits are somewhat between an interface and a mixin: an interface is made only of method signatures, while a trait includes also the full method definitions, on the other side mixins include method definitions, but they can also carry state through attributes while traits usually don't.

Rust's traits may specify just a method signature and force the implementor of the trait to implement the method, but they may specify full definitions of methods too.

Re:Abstraction without overhead: traits in Rust by MichaelGG on Monday May 11, 2015 @05:08PM (#9527859)
Java's interfaces are getting default implementations now, aren't they?
Re:Abstraction without overhead: traits in Rust by jahewson on Monday May 11, 2015 @05:41PM (#9528040)
Yes, they are in Java 8, though you can't implement an interface for an existing class in Java, so it's not quite a trait.