News for hackers. Stuff that matters.
Re:Map[string]interface{} in Go: a user's manual by jrockway on Monday July 26, 2021 @02:25PM (#27963174)
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).
Re:Map[string]interface{} in Go: a user's manual by LambdaComplex on Monday July 26, 2021 @03:01PM (#27963748)
To be clear, "empty interface" is the official term: ctrl+f "empty interface" on https://golang.org/ref/spec
Re:Map[string]interface{} in Go: a user's manual by ibraheemdev on Monday July 26, 2021 @04:25PM (#27964980)
Well the interface's method set is empty, not the underlying type.