3 ms·
Go interfaces are also fat pointers. Basically, the pointer to the type info/method set and the actual data are stored separately. [1] As a result of this you
by throwaway34241 7y ago
Go interfaces are also fat pointers. Basically, the pointer to the type info/method set and the actual data are stored separately. [1]
As a result of this you can use pointers as interface types without boxing them. For example you can take an interior pointer to an array, or a C pointer, and use it as an interface type without boxing since the type info doesn't need to be stored with the data.
[1] https://research.swtch.com/interfaces https://research.swtch.com/interfaces