Top-level async would make asynchronous IO no different from synchronous IO! It's the worst of both worlds.
> the dependencies are statically analyzable
Exactly – which means modules can be loaded concurrently, without having to execute the code. By contrast, imperative loading has to happen sequentially. I explored this aspect of it in a follow-up: https://gist.github.com/Rich-Harris/41e8ccc755ea232a5e7b88de...
That's false. You could still do plenty of things while this asynchronous I/O is happening (including allowing the user to interact with the page, or load other modules in the background).
> By contrast, imperative loading has to happen sequentially.
Yes, but notably, declarative loads are not blocked on imperative loads.
No it's not. Synchronous IO blocks everything. Asynchronous IO with top level await would still allow things queued in the event loop to execute. Plus, top level await + Promise.all would allow you to do operations concurrently, something that synchronous doesn't.
Unless loading a file is a bottleneck, which I doubt.
Loading a file is a bottleneck in the browser, right?