-
Notifications
You must be signed in to change notification settings - Fork 0
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
Deep Dive: dyn Trait Objects and Vtables in Rust #46
Comments
Great post! I think the "former" and "latter" are inverted in the paragraph about pointers and fat pointers? 🤔
Also I not noticed a typo: extra "from". |
Thank you kindly @zeenix. I removed the duplicate from. I'm not a native speaker and I looked up the former / latter thingy again and I believe I used it correctly. If you think the phrasing is unclear, I'll try and come up with something better. |
You got it! I think the confusing bit (for me at least) was that Box isn't a pointer. Maybe it's just my C background overshadowing my Rust knowledge but I think only references can be called pointers. 🤔 |
In any case this small correction will make things clearer: "former are" -> "former is". |
Hey, I'll think of a way to rephrase that parapraph, I think it's confusing after all. One more thing though. And I am honestly not trying to argue with you, just trying to understand your point and I really appreciate that you took the time to comment. Why do you not consider Box a pointer? The rust doc calls it a pointer type. Is it because it contains more members than just the raw pointer (i.e. the allocator)? |
Don't worry about it. It'd be perfectly fine to argue. :) I try not to take things personally. We're all just learners here w/ different way of looking at things.
No. I guess it boils down to the fact that I think there is a difference between pointer type and pointer. I'd consider Box (as well as Arc, Rc, Cell etc) pointer types but not pointers. E.g here: struct Str<'a> {
pointer: &'a str,
} I'd call |
I understand and that makes sense. I'll try to rephrase the paragraph, but I still have to consolidate how I think about these things. Thanks for taking the time to discuss this. I hope the Rust community will stay as welcoming and positive even as it grows more :) |
comments for the article go here
The text was updated successfully, but these errors were encountered: