Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reconsider adding while to the language #2578

@RobinMorisset

Description

@RobinMorisset

In #569 we debated for a long time which constructs to have between loop, continuing,for, while.

I do not wish to reopen the question of loop/continuing. What I'd like to discuss before V1 is the possibility of adding while(e) { s } as syntactic sugar for for(;e;) { s }. This would not replace or remove loop/continuing in any way.

It has the obvious benefits of making the language more familiar and convenient to write for new programmers, while being trivial to implement (being mere sugar for trivial for loops). And I believe it would match our recent attempts to make the language more convenient with things like #2243, #2492.

Metadata

Metadata

Assignees

Labels

wgslWebGPU Shading Language Issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions