-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Proposal: expose tuple type declarations #4335
Copy link
Copy link
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.This issue suggests language modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.This issue suggests language modifications. If it also has the "accepted" label then it is planned.
We now have anonymous tuples, but they can only be created at runtime using the
vartype. While this satisfies "varargs" and coercion to arrays / vectors, we still cannot define a tuple type at comptime.Potential syntax:
Packed tuples should also be possible since it can represent in memory data structures pretty well, like manually managed stacks.
Accepted syntax
Per #4335 (comment):