rust-unofficial / patterns

A catalogue of Rust design patterns, anti-patterns and idioms
https://rust-unofficial.github.io/patterns/
Mozilla Public License 2.0
7.84k stars 354 forks source link

Clarify paragraph in Generics as Type Classes #337

Open alensiljak opened 1 year ago

alensiljak commented 1 year ago

The section 5.2. Generics as Type Classes contains the following paragraph:

In object-oriented languages, classes can inherit behavior from their parents. However, this allows the attachment of not only additional behavior to particular members of a type class, but extra behavior as well.

which I find fairly confusing. The second sentence contains repetitive words and does not clarify the first statement enough. It would help if this paragraph was rewritten and/or expanded to add meaning and additional information. Thanks!