Re:Comparison between Rust and D
by teamhappy on Saturday June 25, 2016 @10:36AM
(#11976435)
I know a lot of people really like shadowing. I obviously don't. GHC has an option to emit a warning and if Rusts compiler adds one for it as well (maybe it has one by know? I don't know) I guess I'm okay with it.
[ Parent
| on HN ]
Re:Comparison between Rust and D
by steveklabnik on Saturday June 25, 2016 @11:09AM
(#11976555)
Clippy has a lint, but it's not turned on by default, even in Clippy.
Re:Comparison between Rust and D
by Manishearth on Saturday June 25, 2016 @11:33AM
(#11976663)
We have three, in fact, which disallow various kinds of shadowing. For example, some people like `let x = <expr containing x>` shadows but not `let x = <totally unrelated>`. But everyone has wildly different style choices here so we leave all three off by default and you can turn them on if you want. I have yet to see a bug in Rust code caused by shadowing, though.