Closed NagayamaToshiaki closed 4 days ago
We're not planning on any changes to Map or Set in this proposal.
However, you could certainly combine https://github.com/tc39/proposal-richer-keys and this proposal to use pattern matching as your key normalization/comparison mechanism.
Thank you for the info! I`ll close this.
For now,
Map
object andSet
object is useless for mapping some objects (unless you stringify them) because objects are compared by reference, thus virtually every object is considered different.However, with advent of custom matchers, you can declare the way to compare them as you want. If you can apply the matcher to the comparison methods inside
Map
, you can use objects asMap
's key as excepted.Is there any plans to other enhancements with custom matchers?