4 ms·
Can you say that traits are like Go interfaces?
by junk_disposal 10y ago
Can you say that traits are like Go interfaces?
- steveklabnik 10y agoYes and no; I've always really enjoyed http://softwareengineering.stackexchange.com/questions/247298/how-are-rust-traits-different-from-go-interfaces http://softwareengineering.stackexchange.com/questions/24729... as a comparison between the two. It's old enough that it's before Rust 1.0, so some of the syntax is a _teeny_ bit wrong (int isn't a type any more, you'd use isize) but the macro picture is the same.