5 ms·
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
by JanKanis 10y 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.
- lobster_johnson 10y agoYou're right, it was lurking in the back of my mind that it must be on the stack entirely.