Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One challenge there is that identity is only supported for some built-in types — only primitives, and structs of primitives; no pointers, slices, maps.

If you want a set of some complex kind of value that contains non-map-indexable types like slices and pointers, then you have build an indirection around it.

A good set implementation needs to support a comparison operation. I really wish this existed for Go maps, too.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: