Skip to content

Why does the spec spell out that identifiers "resolve" to "in-scope" declarations? #5513

@jimblandy

Description

@jimblandy

Why does the WGSL spec language in sections like §8.11 Variable Identifier Expression use the phrasing "X is an identifier resolving to an in-scope Y"? It looks like the spec's definition of "resolving" implies that when "X resolves to Y", Y must be in scope. This phrasing appears in several places.

This is a very minor problem (if it is indeed redundant at all). But when someone bothers to spell out that an identifier resolves specifically to an in-scope declaration, it makes me wonder if it's possible in other situations to have identifiers resolving to not-in-scope definitions, which seems like nonsense. It seems like we could improve the pragmatics of the spec a little bit by not spelling this out.

Metadata

Metadata

Assignees

Labels

copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)wgslWebGPU Shading Language Issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions