Share
Embed
tc39 x jsconf.jp Panel Discussion 2024
2024/10/7 に行われた JSConf.jp x TC39 パネルディスカッションの内容です
Yosuke Furukawa PRO
October 15, 2024
Transcript
13 slides
-
which propsals are you most excited about? ͲͷϓϩϙʔβϧʹظΛ͍ͯ͠·͔͢ʁ ɾ Call
This Operator x 6 ɾ Temporal x 6 ɾ Pipeline Operator x 5 ɾ Promise.try x 4 ɾ Record & Tuple x 3 ɾ Pattern Matching x 2 ɾJSON Modules x 3 ɾModule Declarations x 2 -
which propsals are you most excited about? ͲͷϓϩϙʔβϧʹظΛ͍ͯ͠·͔͢ʁ ɾ Call
This Operator x 6 ɾ Temporal x 6 ɾ Pipeline Operator x 5 ɾ Promise.try x 4 ɾ Record & Tuple x 3 ɾ Pattern Matching x 2 ɾJSON Modules x 3 ɾModule Declarations x 2 Data f low Proposals i18n Pattern Match Module Harmony Promise utilities -
Data f low Proposals intro • https://zenn.dev/yuku/articles/b169ac62ac3271 // Before const
publicArticles1 = (await fetch("/articles", { headers: { Authorization: await getIdTokenFromAuth.call(getAuth()) }, })).filter((a) => isPublic(a)); // After const publicArticles2 = getAuth() ~> getIdTokenFromAuth() |> await fetch("/articles", { headers: Authorization: @ }) .filter(isPublic~(?)); -
Data f low Proposals Discussion • When introducing new operators,
how is it typically discussed within TC39? I'm concerned that since the combinations of operators are f inite, it might be challenging to add new ones. • ৽نͰԋࢉࢠΛ͍͔ͭ͘Ճ͍ͯ͠Δ͕ɺԋࢉࢠΛ৽͘͠Ճ͢ΔͷͬͯͲ ͏͍͏෩ʹTC39Ͱ͞ΕͯΔͷ͔ʁԋࢉࢠͷΈ߹Θ͕ͤ༗ݶͳͷͰɺ Ճ͕͍͠ͷͰͳ͍͔ͱݒ೦͍ͯ͠·͢ • pipeline operator |> • call this operator ~> -
Data f low Proposals Discussion • Have you ever heard
opinions from JS engine implementers regarding this? Are there concerns that optimizations, such as JIT, might become more di ff icult with the introduction of new operators? • JS Engine ࣮ऀͷਓͨͪͲ͏͍͏ҙݟΛ࣋ͬͯΔ͔ฉ͍ͨ͜ͱ͋Γ· ͔͢ʁJITͳͲͷ࠷దԽ͕͘͠ͳΔͳͲͷݒ೦͋Γ·ͤΜ͔ʁ -
i18n intro • Temporal https://tc39.es/proposal-temporal/docs/ console.log('Initialization complete', Temporal.Now.instant()); // example
output: // Initialization complete 2021-01-13T20:57:01.500944804Z -
i18n Discussion • How are things progressing? Stage 3 seems
to be taking a bit longer than expected. • Stage3 গ͚ͩ͘͠ͳ͍Ͱ͔͢ʁ • Are there any blockers currently preventing progress? • ϒϩοΧʔʹͳ͍ͬͯΔͷ͕͋Εڭ͑ͯԼ͍͞ • As a Japanese developer, I'm particularly excited about this because issues like time and locale are crucial and cannot be ignored due to the nature of the services we work with. • ຊਓͱͯ͠ඇৗʹظ͍ͯ͠·͢ɻͳͥͳΒ࣌ؒϩέʔϧͷ͕αʔϏεͷಛ ੑ্ແࢹͰ͖ͳ͍͔ΒͰ͢ɻ -
Module Harmony discussion • I imagine things have become quite
complex at this point. Do you have any plans or ideas on how to approach the situation and where to start? • ݁ߏෳࡶʹͳͬͪΌͬͯΔͱࢥ͏ΜͰ͚͢ͲɺͲ͔͜ΒͲ͏ͬͯखΛ͚ ͍ͯ͜͏͔ͳɺΈ͍ͨͳߏ͋Γ·͔͢ʁ • JSON Modules / import defer will be upgraded soon? • JSON Modules / import defer ลΓ͕ࠓճมΘΓͦ͏ -
Pattern Matching intro • https://github.com/tc39/proposal-pattern-matching match(<subject-expression>) { when <pattern>: <value-expression>;
when <pattern>: <value-expression>; ... default: <value-expression>; } -
Pattern Matching discussion • Stage 1? • How are things
progressing? • etc -
What do you think are the weaknesses of JavaScript? ͲΜͳ͕JavaScriptͷऑͩͱࢥ͍·͔͢ʁ
ɾ Hard to introduce features based on type information while TypeScript is de-facto in the major development scene. ɾLack of common FFI standard ɾ The need to be backwards-compatible ("don't break the web") ɾ core types like Result are missing leading to many incompatible userland implementations ɾ Types ɾ non consistent APIs ɾ script tag would be better to separate the context ɾ modules import apis are complicated.