# Proposal Records (a new one)

**URL:** <https://es.discourse.group/t/proposal-records-a-new-one/2546>\
**Category:** 💡 Ideas\
**Created:** [April 20, 2026, 3:50am UTC](https://es.discourse.group/t/proposal-records-a-new-one/2546 "2026-04-20T03:50:27Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![conartist6](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/conartist6/32/515_2.png) [@conartist6](https://es.discourse.group/u/conartist6)\
**Post date:** [April 29, 2026, 4:41pm UTC](https://es.discourse.group/t/proposal-records-a-new-one/2546/17 "2026-04-29T16:41:26Z")

</div>

You're correct that an explicit access-own syntax like `foo:bar` could solve part of the problem. As part of my design process I considered a solution like that at some length, so I'm happy to discuss the details of it!

To have parity with what this proposal suggests, that `foo:bar` would also need to forbid getter invocation. If you did that you'd at least have the security-hole side fairly well covered.

What a new record accessor syntax _wouldn't_ do is create a clear notion of deep equality. This proposal at least makes it clear how you would implement `recordsDeepEqual` so that it could be implemented in library-space. A proper composites proposal could still follow on, creating a mechanism by which `Map` and `Set` could trigger structural equality behavior instead of reference equality behavior.

As for where it makes a big difference, in a word, validation.

```js
let validNodes = new WeakMap();

let nodeFactory = (childNodes) => {
  if (!Object.isDeepRecord(childNodes)) throw new Error();
  for (let i = 0; i < childNodes.length; i++) {
    if (!validNodes.has(childNodes[i])) throw new Error();
  }

  let node = Object.freezeRecord({ childNodes });

  // We can only cache validity for deep immutable structures
  validNodes.add(node);

  return node;
};

```

Finally I don't contribute to TC39 just out of the goodness of my heart. I'm giving so much time to honing this proposal because I need it urgently. With a new syntax I'd have to either wait years or change every `foo.bar` to `recordGetAt(foo, 'bar')`. Neither of those options is attractive to me.

---

_[View the full topic](https://es.discourse.group/t/proposal-records-a-new-one/2546)._
