Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jrockway
· 5y ago · 0 comments
I don't think "empty" is quite the right mental model. It's an object that has
at least
0 methods, which is a characteristic of every data type. An actually empty type in Go is struct{} (good for map values when the map represents a set).
Comments
[–]
LambdaComplex
5y ago
To be clear, "empty interface" is the official term: ctrl+f "empty interface" on
https://golang.org/ref/spec
[–]
ibraheemdev
5y ago
Well the interface's method set is empty, not the underlying type.