2024-04-03 22:51:24 -06:00
|
|
|
### New unique package
|
|
|
|
|
2024-05-17 18:05:08 -06:00
|
|
|
The new [unique] package provides facilities for
|
2024-04-03 22:51:24 -06:00
|
|
|
canonicalizing values (like "interning" or "hash-consing").
|
|
|
|
|
|
|
|
Any value of comparable type may be canonicalized with the new
|
|
|
|
`Make[T]` function, which produces a reference to a canonical copy of
|
|
|
|
the value in the form of a `Handle[T]`.
|
|
|
|
Two `Handle[T]` are equal if and only if the values used to produce the
|
|
|
|
handles are equal, allowing programs to deduplicate values and reduce
|
|
|
|
their memory footprint.
|
|
|
|
Comparing two `Handle[T]` values is efficient, reducing down to a simple
|
|
|
|
pointer comparison.
|