Hacker News new | ask | show | jobs
by swyx 1681 days ago
there are movements in place for both. the Temporal proposal will add date libraries to the language. and Type Syntax ignoring (types are just skipped at runtime so you dont have to transpile) is in the works.

what you need to consider is what qualifies for being in the language in the first place. Having a small core lets JS be usable in all sorts of contexts, like embedded devices and "stored procedures" of auth and database systems. every thing you add is irreversible and globally piles on requirements to everywhere JS is used.

the solution you ACTUALLY need to solve the OP's question is to add to the DOM/Browser APIs, not to JavaScript. Aka, web components (which have their own problems but i dont have the energy to get into right now)