What is the rationale behind allowing variable shadowing in Rust? [closed]
Because it was initially supported and never removed: It’s more like we never forbade shadowing, since it just fell out of the implementation of the compiler. As I recall, Graydon floated the idea of forbidding shadowing, but I stuck up for the feature, nobody else really cared, and so it stayed. – pcwalton See also: … Read more