tc39 / proposal-richer-keys

Cross cutting proposals around custom identities in collections
32 stars 5 forks source link

compositeKey is redundant with symbols as weakmap keys #20

Open Jamesernator opened 1 year ago

Jamesernator commented 1 year ago

Currently the proposal has both compositeKey which returns a frozen object and compositeSymbol which returns a symbol. The idea was that compositeKey would be useful in cases where the value needs to be weak (e.g. in a weakmap), however now that symbols are allowable as weakmap keys we really only need compositeSymbol.

ljharb commented 1 year ago

Registered symbols still aren’t allowed.