2 ms·
Interfaces are internally pointers, insofar as the value passed when you pass around an interface is a pointer to something so that the value passed is a fixed
by morelisp 6y ago
Interfaces are internally pointers, insofar as the value passed when you pass around an interface is a pointer to something so that the value passed is a fixed size regardless of the underlying type (otherwise you couldn't have any arrays of interfaces).
But if the interface is implemented by a pointer-to-T and you pass a T, you will get an error; and if you have wrapped a T in one interface and try to convert it to another interface that is only satisfied by a pointer-to-T, the conversion will fail.
So the answer to "are interfaces are always pointers?" is yes if you're asking about implementing the Go compiler or worried about the size of some allocation; but no if you are asking about Go's type system.