On Thu, May 13, 2010 at 2:27 PM, chris dollin <
ehog....@googlemail.com> wrote:
> func main() {
> m := make(map[interface{}]interface{})
> m["key"] = 17
> }
>
> fails to compile:
From Effective Go: a map's "key can be of any type for which the
equality operator is defined, such as integers, floats, strings,
pointers, and interfaces (as long as the dynamic type supports
equality). Structs, arrays and slices cannot be used as map keys,
because equality is not defined on those types."
Does interface{} define an equality operator? Alternately, can one be deduced?