Hacker News new | ask | show | jobs
by sieabahlpark 2458 days ago
No one should be asynchronously executing code on import? I'd rather my code call a function to kick it off.
1 comments

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.