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

Document the upsides and downsides of packed arrays versus typed arrays #78257

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jun 15, 2023

I've only added descriptions to Array and PackedColorArray so far. Let me know if it's good to go and I'll add similar descriptions to other Packed*Array types.

@Calinou Calinou requested a review from a team as a code owner June 15, 2023 05:57
@Calinou Calinou marked this pull request as draft June 15, 2023 05:57
@Calinou Calinou added this to the 4.1 milestone Jun 15, 2023
@Calinou Calinou force-pushed the doc-packed-arrays-vs-typed-arrays branch from dbd72a0 to 952dadd Compare June 15, 2023 05:58
@@ -40,6 +40,7 @@
[/codeblocks]
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, does this also apply to packed arrays?

doc/classes/Array.xml Outdated Show resolved Hide resolved
@akien-mga akien-mga modified the milestones: 4.1, 4.2 Jun 19, 2023
@akien-mga akien-mga added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed cherrypick:4.0 labels Jun 19, 2023
@dalexeev
Copy link
Member

Let me know if it's good to go and I'll add similar descriptions to other Packed*Array types.

In my opinion it's worth it, for better discoverability. But this is not good for translators. If we make the paragraph identical for all Packed*Arrays, then it will be one source string on Weblate?

doc/classes/Array.xml Outdated Show resolved Hide resolved
@YuriSizov YuriSizov modified the milestones: 4.2, 4.x Nov 13, 2023
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Nov 13, 2023
@Calinou Calinou force-pushed the doc-packed-arrays-vs-typed-arrays branch 2 times, most recently from ee9c0a8 to 22730be Compare November 15, 2023 22:29
@Calinou Calinou marked this pull request as ready for review November 15, 2023 22:29
@Calinou Calinou force-pushed the doc-packed-arrays-vs-typed-arrays branch from 22730be to ab8c9b6 Compare November 15, 2023 22:30
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 7, 2024
@akien-mga akien-mga merged commit ea961d3 into godotengine:master Apr 8, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants