[Feature Request] @typeInfo of a type
with a unique identifier
#5459
Labels
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Currently, there is no way to key a
HashMap
with atype
to make a lookup table. It would be handy if we could get at a unique value to use for this use case:@typeInfo(T).id
. If@typeInfo(T).id
were unique to each type it would provide the perfect key for a type lookup table.The current workaround is to use a
StringHashMap
keyed off of@typeName(T)
with the values being auto-incremented ints.The text was updated successfully, but these errors were encountered: