Comments (2)
Hi @bathos yes that's correct. It was mostly discussed in relation to when the proposal had the notion of Box
as a way to reference an object from a R/T here #233, with https://github.com/tc39/proposal-symbols-as-weakmap-keys being the replacement for how to 'reference' an object from the R/T the same conversation still applies - with 'box' replaced with 'unique symbol'.
As mentioned in that thread, the capability exists without direct support. So it would be a connivence, rather than providing a new capability. To do this in userland, the R/T is walked to extract all the weakly holdable symbols and then a trie of WeakMap
s is created to link this entire set of symbols to the R/T which is placed in a regular Map
associated to the final WeakMap
in the chain.
from proposal-record-tuple.
Thanks! I didn’t know what to make of the Box discussions when I was looking for prior info about this, so the context about how the notion ended up evolving is helpful.
I realized it wouldn’t constitute a new fundamental capability — I’ve done what were roughly “tuples w/ object members” in userland before myself, though I doubt as elegantly or efficiently as someone else might have. Even so I think composite key utils/syntax/whatever would be pretty valuable language-level features. (That’s all unrelated to this proposal of course, though).
from proposal-record-tuple.
Related Issues (20)
- Forbid hosts creating an impossible records/tuples
- Can we agree on a list of design goals for the README? HOT 2
- Upgradeable ArrayBuffers HOT 5
- add support for tuples to {Async,}Iterator.prototype.flatMap and {Async,}Iterator.from
- `Record` name conflict with Typescript HOT 1
- Why mixing immutability and tuples ? HOT 5
- `let` binding record and tuple should be writable HOT 6
- Some syntactic sugar: no need to insert # before every nested structure HOT 4
- Is this planned for ES14? HOT 6
- What about sets? HOT 14
- Record and Tuple creation should be recursive. HOT 5
- Can I use? HOT 12
- Is empty tuple / record falsy? HOT 8
- Syntax problems with VSCode HOT 2
- Does `.with()` accept array as first argument? HOT 1
- Map/Set’s SameValueZero key/value mapping HOT 2
- Tuple.fromAsync?
- Status of value semantics? HOT 57
- how to determine whether an unknown variable is a specific Record / Tuple HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proposal-record-tuple.