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
Value classes are classes that serve as (mostly immutable) containers for 1 or more values (their fields).
To make them actually usable with pony, they need to be Equatable (e.g. for pattern matching on value), Comparable if you want to sort or compare them, Hashable, if you want to put them in a Map, Stringable for printing etc.
It is especially tricky how to write good hash functions. This section should include a suggestion/recipe on how to write good hash functions in pony. E.g. Equality and Hash values should match up, in that eaual things must have the same hash value.
The text was updated successfully, but these errors were encountered:
Value classes are classes that serve as (mostly immutable) containers for 1 or more values (their fields).
To make them actually usable with pony, they need to be Equatable (e.g. for pattern matching on value), Comparable if you want to sort or compare them, Hashable, if you want to put them in a Map, Stringable for printing etc.
It is especially tricky how to write good hash functions. This section should include a suggestion/recipe on how to write good hash functions in pony. E.g. Equality and Hash values should match up, in that eaual things must have the same hash value.
The text was updated successfully, but these errors were encountered: