Re:V8 adds support for top-level await
by sieabahlpark on Wednesday September 25, 2019 @12:33AM
(#21067627)
No one should be asynchronously executing code on import? I'd rather my code call a function to kick it off.
[ Parent
| on HN ]
Re:V8 adds support for top-level await
by lewisl9029 on Wednesday September 25, 2019 @01:36AM
(#21067933)
Please, this.
Synchronous effectful imports are already are the source of so much frustration, and now we're adding asynchronicity to it?
Just export a init function and let your users choose when/where to run your effectful initialization code, sync or async.