Bonjour Christophe, Yes, it is safe to use reflect.Type as a key. Even if that type was loaded from another shared library through 'plugin'. At least that's how it is supposed to work :)
-s sent from my droid On Sat, Aug 18, 2018, 11:40 Christophe Meessen <christophe.mees...@gmail.com> wrote: > I need to index data by type and I have two options: > - use a string as key and index the string returned by reflect.Type.Name() > - use reflect.Type as key > > I have the impression that indexing by reflect.Type would be slightly more > speed and space efficient, but I'm unsure if the relation between > reflect.Type and reflect.Type.Name() is bijective. > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.