an interoperability for legacy features. • This is not weak, strong point. • JS survives 20 years. • Backword compats are really important. • Some aspects of JS make it harder, such as being able to modify prototypes • To keep compatibility is needed. documentation is also important.
specs (e.g. ECMA262 does not have Cancellation. It's relying on DOM AbortController) • ECMA262 ͚ͩ͡Όͳͯ͘ɺଞͷ༷ݟ͓͔ͯͳ͍ͱ͍͚ͳ͍ͱ͜Ζ ʢྫ͑ɺΩϟϯηϧDOM AbortController ͱ͔ݟͯͳ͍ͱ͍͚ͳ ͍ʣ • Cancellation is misunderstandable... it is not ECMA262 spec. • JS is just the language, it is not runtime environment. some other langs have similar architecture. •
• ෆมΛఏڙ͢Δػೳ͕ଞͷݴޠʹൺͯऑ͍ࣄ • Most js objects are mutable, so it is hard. • Object.freeze / seal are pragmatic... • Haskell is ever thing is immutable, python, c++, Java are not so immutable. It depends on design? • TS is not so immutable either.
JS developers could not handle unde fi ned property access and fi nd these faults at production. • TypeScript will help you!! • Optional chaining ?. will help you!!
ͱͯ͠ѻͬͨΓ string ͞ͳ͖Ό͍͚ ͳ͍ͱ͜Ζʹ number ͨ͠Βউखʹcastͨ͠Γ) • New APIs should not handle these unpredictable behaviour • Throw errors if the types are invalid.
locked down (built-in prototype is frozen, global object is also freezed) • 2. realm proposal (create new environment / realm, prototype polluted in the environment, but it is not affected all world. shadow realms are stage3, ) • node vm module does not solve security problems.
many options like es2022, nodenext, bundler, etc. • this prop nightmare is introduced by Node.js CJS / ESM options. • Node.js has CJS / ESM interop feature. • Historically, CJS is needed in Node.js. • ESM was declared in 2015. • Node.js core committer thought 2 specs would cause migration issues. • So, Node.js implemented CJS / ESM interops using the fi le extension and the package.json `type` fi eld.
brings ESM/CJS nightmare. • Node.js developers feel if CJS/ESM interop has never been implemented, migration nightmare will start. • I guess TC39 people think module system is required and it would be better to be browser friendly (CJS is not ideal it is for Node.js / Server-side).