Hacker News new | ask | show | jobs
by tnzm 1740 days ago
Class static blocks are weird. Give me async constructors already!
3 comments

Can you not just define an async static function that returns an instance?
I can, but that's ugly - it violates standard semantics and generally introduces a new thing to know about.
You can simply return promise from constructor \m/
Why would you need that?
Why not?