#1472 might add the super-common inter-scope shadowing case.
Most languages don't support intra-scope shadowing, but there are times when it can be useful to effectively change the type (or modifiers) of an identifier.
var sum = 0;
for (var i = 0; i < N; i+=1) {
sum += data[i];
}
const sum = sum;
This seems fairly straight-forward to support, though I expect some will feel that "we shouldn't support something no one should ever do", for some personal conviction of "should".
I desire this in other programming languages, and I would be happy if it were possible (and obviously not mandatory) in WGSL.
I don't think this is important, but some people feel this would be nice to have.
#1472 might add the super-common inter-scope shadowing case.
Most languages don't support intra-scope shadowing, but there are times when it can be useful to effectively change the type (or modifiers) of an identifier.
This seems fairly straight-forward to support, though I expect some will feel that "we shouldn't support something no one should ever do", for some personal conviction of "should".
I desire this in other programming languages, and I would be happy if it were possible (and obviously not mandatory) in WGSL.
I don't think this is important, but some people feel this would be nice to have.