3 ms·
> Also, an important difference is that Rust traits can be used as Java-style interfaces; for example, you can have a list of objects of different types, but th
by Argorak 12y ago
> Also, an important difference is that Rust traits can be used as Java-style interfaces; for example, you can have a list of objects of different types, but that all implement `Show`.
To be a tiny bit nitpicky here: you can have a list of pointers to objects of different types. Vec<Show> is illegal, Vec<&Show> is not.
Still, it's like Java in that regard ;).