3 ms·
wyager is right, empty interfaces in Go are exactly that - a type (set) which every value is a member of, search for Go/interface{}: http://en.wikipedia.org/wik
by friendly_chap 12y ago
wyager is right, empty interfaces in Go are exactly that - a type (set) which every value is a member of, search for Go/interface{}: http://en.wikipedia.org/wiki/Top_type http://en.wikipedia.org/wiki/Top_type
Edit: the downvoter cares to explain?
- overcyn 12y ago"However, several languages have types in the second regard above (e.g. void * in C++, id in Objective-C, interface{} in Go), static types whose variables can accept any object value, but which do not reflect real runtime types that an object can have in the type system, so are not top types in the first regard." Do you consider void* the same as Java's Object?