upvote
Idiomatically Rust explicitly prefers to make a type more generic, for example it's fine to talk about a HashMap<Goose,String> for some arbitrary user defined type Goose with no traits, and Rust will even cheerfully make you one... but you can't put any key+value pairs into that hash map because Goose isn't Eq [or Hash] so all the APIs for actually inserting or modifying the data don't exist on this type.

In contrast C++ won't even let you have std::unordered_map<Goose,int> because it wants to know how to compare and hash the keys before making the type at all.

reply