canonical / canonical/rust-best-practices

Feedback: People are bad at keeping lists in their own minds

Open
#2 3 comments 0 reactions 1 assignee Claimed by @TheSignPainter98 View on GitHub
feedback
Dominant language
RenderScript
Stars
107
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Still haven't finished reviewed the whole document, but caught this in a reference from a PR:

> Derived items should be ordered as follows:
>
> Copy
> Clone
> Debug
> PartialEq
> Eq
> PartialOrd
> Ord
> Other standard traits, ordered lexicographically
> Third party traits, ordered lexicographically

Expecting people to remember what is standard or not is reasonable, and also somewhat implied by the fact they have to import them from somewhere. With that said, expecting people to keep the exact order for the first 7 items doesn't seem reasonable.

What is the underlying rationale here? If there is one, that's what we need to explain and people must keep in mind. Where there is none, it should be mechanical instead of memorized.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.