Allow swizzle field names in array initialization #4289
Porem5002
started this conversation in
Ideas/Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue: #4288
This feature comes from something that was previously possible using the raylib bindings.
Until around dev-2023-11, the Color type from raylib was defined as a struct so we could write code like this and it was pretty obvious what it would do:
But since then (after this more precisely) this type is defined as a fixed array, which allows for more flexibility but also means that the previous code no longer compiles since those fields don't actually exist in an array.
My request is to allow for this kind of syntax for initializing arrays, making the language more consistent.
Beta Was this translation helpful? Give feedback.
All reactions