Hacker News new | ask | show | jobs
by JanKanis 3709 days ago
I don't think you're right that interfaces are implemented as a pointer to a struct. The struct is inline like any other struct, and it contains a pointer to a type and a pointer to the value, like `([*Baz], nil)` in your example. The problem is that a nil interface in Go is compiled to `(nil, nil)` which is different.

That still makes this inexcusable of course.

1 comments

You're right, it was lurking in the back of my mind that it must be on the stack entirely.