-
Watch for accidental shadowing when using
:=in inner scopes. -
Do not give a local variable the same name as an imported package; this makes the package unreachable for the remainder of the enclosing block.
-
Never redefine an identifier from the universe block. The compiler may not catch it, and the resulting bugs are subtle.
-
If the variable being tested in the condition of an if statement is only useful within the if and else blocks, assign its value in the initialization section of the if statement so it is scoped to just the if and else blocks.
Progress is saved on this device.