tc39 / proposal-defer-import-eval

A proposal for introducing a way to defer evaluate of a module
https://tc39.es/proposal-defer-import-eval
MIT License
208 stars 12 forks source link

Throw when doing import `defer *` of a module with no exports #34

Open nicolo-ribaudo opened 4 months ago

nicolo-ribaudo commented 4 months ago

@guybedford Is this fix better than #33?

Closes #19

guybedford commented 4 months ago

Thanks for adding this, I have a weak preference for this form. Seems sensible to leave this one open to discussion?

ByteEater-pl commented 4 months ago

I'm against. It hurts consistency. Edge cases, even when they're pointless and advisable not to write, should behave the same, as much as possible, as if there were no sharp edge. It simplifies semantics, tools relying on semantics, spec size and teaching. It also saves special cases in code generation scenarios.