Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd common traits to public types #472
Conversation
|
Thank you for this pull request. I’d prefer individual changes to be motivated by more than just guidelines. A lot of of these impls seem to be of very dubious use. For example the As the name suggests, Deriving Some other impls, while not exactly wrong, don’t seem to make much sense. For example Code style changes (in this case re-ordering derive names) in the same commit as other changes makes it hard to see what the significant changes are (in this case which derives were added). When mentioning an external document that is on the web, providing an URL would be nice. These guidelines are on multiple separate pages, so there is no easy way to CTRL-F through them to find https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#types-eagerly-implement-common-traits-c-common-traits |
|
The changes are motivated by my experience in integrating the lib and having to write a bunch of tests that ensure hashing isn't broken. The guidelines are a rationalization after the fact. I can appreciate the perspective that a lot of the traits don't make sense within the lib, but internal utility isn't the point of publicly exported traits. For example, the Long story short: maintaining the ability to sort by error type after integrating |
|
I’m having trouble understanding how the different parts of your last message relate to each other. While some of the above is debatable,
|
|
You're absolutely right, I now see that sorting on the |
sterlingjensen commentedNov 28, 2018
•
edited by larsbergstrom
Improves interoperability, making downstream manual implementation unnecessary.
rust-lang-nursery/api-guidelines
C-COMMON-TRAITS
This change is