Artwork

Kandungan disediakan oleh Surma and Jake Archibald. Semua kandungan podcast termasuk episod, grafik dan perihalan podcast dimuat naik dan disediakan terus oleh Surma and Jake Archibald atau rakan kongsi platform podcast mereka. Jika anda percaya seseorang menggunakan karya berhak cipta anda tanpa kebenaran anda, anda boleh mengikuti proses yang digariskan di sini https://ms.player.fm/legal.
Player FM - Aplikasi Podcast
Pergi ke luar talian dengan aplikasi Player FM !

TC39 Roundup Drama Edition Part I: Shared Structs

30:47
 
Kongsi
 

Manage episode 453447581 series 3531609
Kandungan disediakan oleh Surma and Jake Archibald. Semua kandungan podcast termasuk episod, grafik dan perihalan podcast dimuat naik dan disediakan terus oleh Surma and Jake Archibald atau rakan kongsi platform podcast mereka. Jika anda percaya seseorang menggunakan karya berhak cipta anda tanpa kebenaran anda, anda boleh mengikuti proses yang digariskan di sini https://ms.player.fm/legal.

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! i1.getPrivateField(i2);

This behavior makes it hard to compile private fields just as "slots" on an object, as clearly additional behavior is required. This is somewhat at odds with the goal of achieving a fixed layout.

Also, launching is mid-2025 is very optimistic.

Resources:
  continue reading

16 episod

Artwork
iconKongsi
 
Manage episode 453447581 series 3531609
Kandungan disediakan oleh Surma and Jake Archibald. Semua kandungan podcast termasuk episod, grafik dan perihalan podcast dimuat naik dan disediakan terus oleh Surma and Jake Archibald atau rakan kongsi platform podcast mereka. Jika anda percaya seseorang menggunakan karya berhak cipta anda tanpa kebenaran anda, anda boleh mengikuti proses yang digariskan di sini https://ms.player.fm/legal.

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! i1.getPrivateField(i2);

This behavior makes it hard to compile private fields just as "slots" on an object, as clearly additional behavior is required. This is somewhat at odds with the goal of achieving a fixed layout.

Also, launching is mid-2025 is very optimistic.

Resources:
  continue reading

16 episod

Semua episod

×
 
Loading …

Selamat datang ke Player FM

Player FM mengimbas laman-laman web bagi podcast berkualiti tinggi untuk anda nikmati sekarang. Ia merupakan aplikasi podcast terbaik dan berfungsi untuk Android, iPhone, dan web. Daftar untuk melaraskan langganan merentasi peranti.

 

Panduan Rujukan Pantas

Podcast Teratas
Dengar rancangan ini semasa anda meneroka
Main