Reflect: generic type identification#83
Conversation
reflect_generic_id rfc|
These requirements would probably be part of the trait implementation requirements. Apologies if this comes off a bit chaotic. I might have only a set of specific applications in mind and also maybe some misunderstandings about the current reflect implementation and uses/connections. |
|
|
You likely don't want to hash
This cannot be done automatically on-the-fly when a It might work if you perform this conversion the moment you create some type, essentially canonicalizing that type, but then you're just performing deserialization using reflection and type paths should be enough for that.
My point is that for many usecases this cannot be just a possibility, it has to be a guarantee or you have unsoundness. |
|
|
||
| > Why should we *not* do this? | ||
|
|
||
| This introduces a concept of multiple type identifications which might have no connection between them. There would be no singular central type registry, but instead a number of registries, each with a different id type and for a different purpose. |
There was a problem hiding this comment.
I think this is probably one of the biggest issues with this approach. If we end up going with a generic type identification system, we need a way to interop between them such that we can have a central registry.
If we don't have that, then the onus to use the correct registry/identification falls on the user.

Rendered: https://github.com/JohnTheCoolingFan/bevy-rfcs/blob/reflect_generic_id/rfcs/83-reflect_generic_id.md
Make type identification in the Reflection system generic, allowing multiple identification data types to coexist.