Skip to content

After reading the book, RBE's definition of Rectangle in 3.1 is un-intuitive #1170

Description

@benreyn

Disclaimer: This is just feedback on the content from the perspective of a learner, not a "real" bug or issue.

I found quite a bit of advice online recommending "the book", followed by Rust By Example to get your feet wet with understanding rust. The book defines a rectangle in Chapter 5 as a height and width. RBE defines a rectangle as 2 points in space. Then, similar to the book, RBE asks the reader to implement a function that computes the area of a rectangle. It actually took me a bit of googling to figure out how a rectangle could be defined in such a way.

It felt un-intuitive to me to have these two official resources diverge in this way, and came across as confusing to me. (I found myself asking, "Why am I googling the different ways that a Rectangle can be represented in code on a day where I sat down to practice some rust concepts I learned from the book"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions