Skip to content

Add arrow operator as sugar for (*var). #4114

@wrightwriter

Description

@wrightwriter
val b = (*f).bar;
val f = &(*f).bar;

turns into

val b = f->bar;
val f = &f->bar;

This would make pointers easier to write and more readable. Would also make WGSL more accessible to people without systems language experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA request for a new GPU feature exposed in the APIwgslWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specification

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions