Better HN
topnewbestaskshowjobs
Log inSign up

anon3474422

4 karma · joined Mar 21, 2018 (8y ago) · 1 submissions

Submissions

comment 8y ago · link · parent

Rust explicitly allows shadowing, that way you can have it both ways. An immutable variable that can't be reassigned but you can still reuse names.

That is to ease the pain of unwrapping nested types and error-checking intermediate steps so you don't have to come up with new names for each intermediate.