News for hackers. Stuff that matters.
Re:Top-level await in JavaScript is a footgun by domenicd on Wednesday September 14, 2016 @04:01PM (#12500737)
But your entire app wouldn't be held up! Only that subgraph.
Re:Top-level await in JavaScript is a footgun by rich_harris on Wednesday September 14, 2016 @04:22PM (#12500917)
So in the future, you'll have to split up your app into multiple entry points specifically to contain the effects of top-level await spilling out? Sounds like using explicitly async functions would be a far more understandable and maintainable approach.
Re:Top-level await in JavaScript is a footgun by robpalmer on Wednesday September 14, 2016 @06:50PM (#12501881)
So the argument is that the bad-effects of top-level await are viral. One bad apple in the app entry point's dependency graph stalls evaluation of the main entry point. And to mitigate this risk, you have to segregate out sub-graphs that you safely load via imperative import().

Doesn't the same risk apply if one of the modules in the graph declaratively imports a module hosted on a slow external CDN?

Re:Top-level await in JavaScript is a footgun by untog on Wednesday September 14, 2016 @08:10PM (#12502381)
It does, yes. Using a slow, external CDN is a bad idea for exactly that reason.