Hacker News new | ask | show | jobs
by paulddraper 1091 days ago
How do you think features make it into the spec?

Specification and implementation are chickend-and-egg.

2 comments

Is bun actively participating in these discussions, or are they just implementing whatever they wish and not participating in the chicken-and-egg process?
The main JS implementations do not run ahead of the spec. They implement at Stage 3.
Import attributes are at Stage 3: https://tc39.es/proposal-import-attributes/
I'm well aware, but this is not just import attributes. It's using import attributes syntax to trigger a transform of the importing module, in addition to changing the behavior of the exporting module.
More concise than my previous reply: that’s just moving the same outcome around in time. If a fully runtime-only import attribute would result in inlining a static-at-build-time value where its export is called, this is just inlining it sooner. That seems fine to me unless it doesn’t fit the import attribute use case. In which case… don’t voluntarily use it?
A. Import attributes are stage 3.

B. If you blur the line between "runtime" and "compiler", you'll realize that a lot of JS ecosystem (e.g. Babel) run ahead of that.