-
Notifications
You must be signed in to change notification settings - Fork 543
Add to definition of P<T>
type to Appendix D: Code Index
#182
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
Comments
@eddyb's definition of it is an "immutable |
It's not "needed", not to a large extent. The actual code has (potentially-outdated) documentation. |
@eddyb Well, heap allocation is surely needed, otherwise we'd have to deal with an immutable tree, and that would be very expensive during construction and later modification. |
I mean as a separate concept from Box or anything else. |
Sorry, I'm not sure I understand. We use P when we need an owned immutable pointer. We can't use &T because that is not owned and we can't use Box because it is not immutable. Is that correct? |
And why it's needed.
The text was updated successfully, but these errors were encountered: