News for hackers. Stuff that matters.
Re:V8 adds support for top-level await by mstade on Friday September 27, 2019 @11:48AM (#21093237)
Yeah but that changes the semantics of the function, whereas `async` arguably just changes the mechanics. The promise itself is not interesting, it's whatever value it (eventually) returns. My point is that a language that had implicit await would let you go on making function as async as you want them to be, and callers would be none the wiser. It'd also allow the caller to decide when to run things asynchronously and even truly defer values, something which JS promises can't do since they immediately execute, but that's an altogether different discussion.

There are no comments on this comment yet.