News for hackers. Stuff that matters.
Re:Go compiler internals: Adding a new statement to Go by icxa on Friday July 05, 2019 @11:50AM (#20363450)
Other comments are missing out the other key point: go packages are sometimes imported for side effects, and this pattern is common enough in the community (although albeit slightly discouraged now). So unused imports can still impact your code due to the init() functions
Re:Go compiler internals: Adding a new statement to Go by atombender on Friday July 05, 2019 @01:07PM (#20364064)
Unused imports that are imported solely for side effects should be imported this way to avoid that problem:

  import (
    _ "github.com/some/package"
  )
Given that this is the only way to have unused imports with mainline Go — in other words, it's impossible to accidentally remove one once it's been declared this way — I'm not sure I see what the argument is.
Re:Go compiler internals: Adding a new statement to Go by icxa on Friday July 05, 2019 @03:16PM (#20365038)
> I'm not sure I see what the argument is.

That there are other reasons why unused imports are a compilation error in go, and it isn't as simple as turning them into warnings

Re:Go compiler internals: Adding a new statement to Go by apta on Friday July 05, 2019 @07:46PM (#20366773)
> go packages are sometimes imported for side effect

Sounds like another source of errors.

Re:Go compiler internals: Adding a new statement to Go by icxa on Wednesday July 10, 2019 @01:47PM (#20404412)
Fatal errors would probably be bubbled up via a panic, in which you can cover in a recover() block