cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
503 stars 82 forks source link

Redundant phrasing #174

Open seishun opened 3 months ago

seishun commented 3 months ago

URL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch17-02-trait-objects.html#using-the-trait

Description of the problem:

It doesn’t check whether a component is an instance of a Button or a SelectBox, it just calls the draw method on the component.

"a Button" already means an instance, so "an instance" is redundant.

Suggested fix:

"an instance of Button or SelectBox" or "a Button or a SelectBox".

willcrichton commented 1 week ago

I would keep the wording as-is just because the rest of the passage uses "instance" to differentiate between a type and a value of that type. I agree it's a little redundant, but it's reasonable to be maximally clear to avoid confusion in these abstract discussions.

seishun commented 6 days ago

One of the fixes I suggested keeps the "instance".