You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very useful, allowing HashSets and HashMaps keyed by types. For example I would like to use this to remember for which types I have generated destructors (or decided I don't need a destructor).
An alternative that would solve my problem would be to impl Ord for Type.
There is some concern that this might be expensive. Types are immutable so this could be mitigated by adding a hash field to types which may have a large number of "sub-Types". We could use interior mutability to not compute the hash until it was needed for the first time.
The text was updated successfully, but these errors were encountered:
This is very useful, allowing
HashSet
s andHashMap
s keyed by types. For example I would like to use this to remember for which types I have generated destructors (or decided I don't need a destructor).I have done this in #1157 , it is not too bad.
An alternative that would solve my problem would be to
impl Ord for Type
.There is some concern that this might be expensive. Types are immutable so this could be mitigated by adding a
hash
field to types which may have a large number of "sub-Types". We could use interior mutability to not compute the hash until it was needed for the first time.The text was updated successfully, but these errors were encountered: