Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rephrase statement in Deref: "Collections are smart pointers" #257

Open
StrayLittlePunk opened this issue Apr 21, 2021 · 4 comments
Open
Labels
A-idiom Area: Idioms C-amendment Category: Amendments to existing content
Projects

Comments

@StrayLittlePunk
Copy link

Disadvantages
Methods and traits only available via dereferencing are not taken into account when bounds checking, so generic programming with data structures using this pattern can get complex (see the Borrow and AsRef traits, etc.).
why method and traits only available via dereferencing are not taken into account when bounds checking ?

@MarcoIeni
Copy link
Collaborator

I agree it's really complicated.
If someone wants to improve this a PR is welcome.

@pickfire
Copy link
Contributor

pickfire commented Apr 21, 2021

I don't understand that sentence itself. I thought bound checks are usually eliminated when using collections and iterator method?

@StrayLittlePunk
Copy link
Author

@pickfire I don't think so, it said method and trait are not taken into account. the statement link at below
Original Statement link

@StrayLittlePunk
Copy link
Author

@MarcoIeni I think so too

@simonsan simonsan added C-amendment Category: Amendments to existing content A-idiom Area: Idioms labels May 5, 2021
@simonsan simonsan added this to ToDo-Idioms in Content May 5, 2021
@simonsan simonsan changed the title There is a statement that I don’t understand in "Collections are smart pointers" Rephrase statement in Deref: "Collections are smart pointers" Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-idiom Area: Idioms C-amendment Category: Amendments to existing content
Projects
Content
ToDo-Idioms
Development

No branches or pull requests

4 participants