logoalt Hacker News

masklinnlast Wednesday at 4:45 AM0 repliesview on HN

> That "special cases reassignment" where ':=' is sometimes a shadowing declaration and sometimes a reassignment sounds like the opposite of that.

FWIW it is never a shadowing declaration. It is at least one non-shadowing declaration plus any number of reassignments.

The fun part is the tendency to keep reassigning to `err` makes the unused variable largely useless, so it’s just there to be a pain in the ass, and your need a separate lint anyway.