-
Notifications
You must be signed in to change notification settings - Fork 353
Open
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Milestone
Description
It would have the special meaning of "unused" and it wouldn't be valid to use any ._ member from any code. Additionally, it would be valid to have multiple _ that would normally collide.
We could do this in other places as well (function args in particular), but struct members are most important if you have to add struct members in order to insert padding.
Prior art comes from numerous functional-adjacent languages like Rust (which does not actually allow it in structs) and Haskell/OCaml (in matches and functions iirc, probably not in records).
If we don't want to do this now, the safe thing is to disallow identifiers of _ so that we can use the syntax later. Rust does this.
kvarkstefnotch
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues