This post was originally tweets but then things happened, and it needed a new linkable home. Btw, I’m now @commaok@inuh.net on Mastodon. This post is about manual type specialization, which can make a big difference in some hot code. Consider this: type Gopher interface { Goph() } func f(x Gopher) { // ... if t, ok := x.(*T); ok { t.Goph() } else { x.Goph() } // ... } It’s weird.
No pages have linked to this URL yet.