[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove .get fn names, use third-person in docs #44

Open
Frando opened this issue Aug 10, 2024 · 1 comment
Open

Remove .get fn names, use third-person in docs #44

Frando opened this issue Aug 10, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Frando
Copy link
Contributor
Frando commented Aug 10, 2024

Hi,
while starting to work with willow-rs I noted some things where the codebase differs from the rust naming conventions and documentation conventions:

  • In function docs willow-rs uses imperative ("Create a new path") whereas the rust conventions use third person ("Creates a new path")
  • A few methods are prefixed with get_, which is discouraged in the conventions. So Path::component_count instead of Path::get_component_count

If there aren't strong reasons for deviating from the convention, I found it to be quite helpful in my coding experience to just stick with it for general consistency and bikeshed avoidance.

@AljoschaMeyer
Copy link
Contributor

Those are on me, I think. I didn't know about those conventions, and these are how I do them usually (exactly for general consistency =D). But I personally am happy to defer to the wider conventions of the rust ecosystem on these points.

@sgwilym sgwilym changed the title Naming conventions for functions and docs Remove .get fn names, use third-person in docs Sep 6, 2024
@sgwilym sgwilym added documentation Improvements or additions to documentation good first issue Good for newcomers labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants