What about to have structs in GDScript? #4670
Replies: 1 comment
-
This is already being tracked in #2816. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
GDScript already has inner classes, but they are passed by value or by reference?
Having
struct
s passed by value supposes boost → memory cache optimization.And are great to pass multiple values between functions either by passing as args or returning them, cheap in resources.
As far as I know inner classes only are meant to be used within the Type that holds them, for code organization.
But can't be passed in between Types, unless both hold the same inner class (both would be supposed to be identical).
It would make sense or there's something that I'm missing here?
Beta Was this translation helpful? Give feedback.
All reactions