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

Explain the philosophy of bevy_ptr in crate docs #12301

Closed
alice-i-cecile opened this issue Mar 4, 2024 · 0 comments · Fixed by #12391
Closed

Explain the philosophy of bevy_ptr in crate docs #12301

alice-i-cecile opened this issue Mar 4, 2024 · 0 comments · Fixed by #12391
Labels
A-Pointers Relating to Bevy pointer abstractions C-Docs An addition or correction to our documentation

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 4, 2024

I wonder if it would make more sense for bevy_ptr's non-null API to look more like a typed version of bevy_ptr::Ptr

Isn't that just &'a T and &'a mut T? The way I view it is that borrows are lifetimed, mutability-locked, aligned, and strongly typed pointers, and bevy_ptr tries to fill the gap between *mut () and &'a T by dropping one or more of the constraints on borrows.

Originally posted by @james7132 in #12269 (comment)

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-Pointers Relating to Bevy pointer abstractions labels Mar 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 12, 2024
# Objective
Fixes #12301. Provide more comprehensive crate level docs for bevy_ptr,
explaining it's methodology and design.

## Solution
Write out said docs.

---------

Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Pointers Relating to Bevy pointer abstractions C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant