3 ms·
Reading on how rust does it some. First search I'm finding is https://maxuuell.com/blog/how-not-to-shadow-variables https://maxuuell.com/blog/how-not-to-shadow
by taeric 3y ago
Reading on how rust does it some. First search I'm finding is https://maxuuell.com/blog/how-not-to-shadow-variables https://maxuuell.com/blog/how-not-to-shadow-variables, which amuses me to see that you can just redeclare variables in the same scope. That feels like a footgun in itself. The rest of the footguns listed there seem about right.
Is that how other languages are starting to do this?
And agreed that not polluting the scope is good. That is why mutating the variable was the preferred way for a lot of folks.