-
Notifications
You must be signed in to change notification settings - Fork 353
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification
Description
[edit:] This was previously raised in detail by @kvark here.
In particular, this would preclude certain syntax proposals, impacting the following discussions:
- Syntax for "the zero value" for bool type, numeric types, and compositions of them #685: can't have a syntax like
const x: vec3<f32> = {};, can have a syntax likeconst x = vec3<f32>();. - Numeric literals and [wgsl] Numeric sizes #575: can't have an "un-narrowed integer literal" type; can't have
const x: u32 = 1;, would useconst x = 1u;. - [wgsl] Implicit types for variable declarations with expressions. #560: This makes it always possible to omit type annotations on
const/var- they become simple type assertions, as there’s only one valid type annotation. It's even possible to remove them from the grammar (@jdashg proposed this before).
I think this is a desirable trait for simplicity and explicitness of the language, and aside from numeric literals I think it has very little negative impact on authorability.
kvark, grovesNL and mehmetoguzderin
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification