Order dependence for equality · Issue #15 · tc39/proposal-record-tuple (original) (raw)
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
Description
From the readme:
if they have the same values stored and inserted in the same order, they will be considered strictly equal
This is surprising to me. Contrast python dicts or Purescript records.
It's also just a weird path-dependence in values: I would not expect it to matter if I construct something by doing (const { a: 0 }) with .b = 1
or (const { b: 1 }) with .a = 0