A Particularly Gnarly Case of Go’s Non-Nil Interfaces

from blog Daniel Mangum, | ↗ original
Most seasoned Go programmers are familiar with the memory representation of an interface. In fact, A Tour of Go, the canonical starting point for new Go programmers, makes sure to describe how interface values contain a value and a type (for a more specific description, see Russ Cox’s blog post on how interfaces are implemented), and even goes so...