Skip to content
Global sound
Off The Main Thread

Off The Main Thread

TC39 Roundup Drama Edition Part I: Shared Structs

· 31 min · Season 1 Episode 13

Show notes

In this episode, Surma talks about the Stage 2 proposal "JavaScript Struct", which introduces fixed-layout objects and the ability to share them between realms.
Notes & Corrections from Shu:
Surma was slightly wrong about why private fields were originally considered problematic for sharability. The problem occurs when a class can be evaluated multiple times:
function makeClass() { return class MyClass { #priv; getPrivateField(instance) { return instance.#priv; } }; } const C1 = makeClass(); const C2 = makeClass(); const i1 = new C1(); const i2 = new C2(); // this throws!…

Website: 7f4e1dd2-207b-4e10-9995-ec44c3c76816.libsyn.com

Live, last hour: 13,095 songs on 6,814 stations in 146 countries

Discover the world through radio

More ways to discover (9)

Heard something good? Save it, or open it straight away in Spotify.

Black CokeContinue listening