The-Complete-Rust-Programming-Reference-Guide
The-Complete-Rust-Programming-Reference-Guide copied to clipboard
Trait names violates Rust's naming conventions
Hi, thanks for the great book but one thing that bugs me: You keep using 'able' suffixed trait names such as 'Playable' or 'Loadable' that violates Rust's naming convention.
Trait names once was hotly debated topic and not using 'able' suffixed names was deliberate choice because their close relationship to OOP and some other loaded meanings. I wish you've have picked more "idiomatic" names for your examples.
Hi @snnsnn , Can you give an example and maybe share references? (I am a newbie with Rust, reading this book at the moment (and enjoying it!), but would like to start using proper Rust conventions)
Hi @stellasia,
There was a clear warning against able-suffixed trait names in Rust's core documentation, at least how I remember it, but unfortunately could not find it. However you can check following resources to get an idea:
- https://github.com/rust-lang/api-guidelines/discussions/28
- https://rust-lang.github.io/api-guidelines/checklist.html
- https://rust-lang.github.io/rfcs/0430-finalizing-naming-conventions.html