An idea for adding functionality to Rust regarding shadowing

Instead, I suggest:
let x=3;
let x=4;
let mut x=5;

Do this:
let x=3;
hat x=4;
hat mut x=5;

Since Rust specializes in catching human oversights, and shadowing is somewhat akin to pointers, I believe that shadowing should also be caught at the syntactic level.

I'm tired today, I'm not sure this post is a joke or serious, but what does this syntax buy you?

Would you mind elaborating on this point? I don't see any semantic similarities between shadowing and pointers.


While I can see that sometimes a let i = 0; somewhere in a long function, deep within nested loops may cause subtle bugs, I don't think a syntax change for shadowing would be warranted, as these issues are usually best solved with better abstractions.

For instance, one could create a log of shading events—or a way to quickly jump to the start of each shaded period.