Using {Blocks} in Rust & Go for Fun & Profit

from blog taylor.town, | ↗ original
Did you know you can just whip out curly-braces all over the place in Rust and Go? a := 1 a = 2 { b := 1 } b := 2 let mut a = 1; a = 2; { let b = 1; }; let b = 2; let c = { let mut d = 1; d = 2; d }; But why on Earth would you even want to do this? Creating "Construction-Zones" When you're creating a variable that demands multiple...