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

Immutable AxisAlignedBB, Vector3 etc #88

Open
dktapps opened this issue Jul 6, 2023 · 0 comments
Open

Immutable AxisAlignedBB, Vector3 etc #88

dktapps opened this issue Jul 6, 2023 · 0 comments

Comments

@dktapps
Copy link
Member

dktapps commented Jul 6, 2023

No one expects the manipulation methods of AxisAlignedBB to alter the AABB directly. Allowing this is also a headache.

We already don't use Vector3 as mutable since PM 4.0.

In PHP 8.1, it's possible to use readonly to make all of the properties immutable. In 8.2, we'll be able to make whole classes readonly, but that also prevents inheritance by non-readonly classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant