5 ms·
Not quite. What you have is a single type interface{} that happens to be the super type of all other types. You still haven't solved the issue of having multipl
by tikhonj 13y ago
Not quite. What you have is a single type interface{} that happens to be the super type of all other types. You still haven't solved the issue of having multiple different types in a tuple--you've just thrown all the type information away!
Think of a tuple as an anonymous struct. (Or perhaps think of a struct as a tuple with labels :P.) We want to statically differentiate between a pair of ints, a pair of strings and an int, string pair, which we simply can't do with interface{}.