The-Complete-Rust-Programming-Reference-Guide icon indicating copy to clipboard operation
The-Complete-Rust-Programming-Reference-Guide copied to clipboard

Trait names violates Rust's naming conventions

Open snnsnn opened this issue 5 years ago • 2 comments

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.

snnsnn avatar Aug 21 '19 23:08 snnsnn

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)

stellasia avatar Jan 20 '22 15:01 stellasia

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

snnsnn avatar Jan 20 '22 15:01 snnsnn