On Tue, Sep 27, 2016 at 10:23 AM, Li Xiaolong <898310...@outlook.com> wrote:
> 3: the async function calls identically with sync functions, makes it hard > to check out if the function is async without jumping to the definition. > But OMP can easily be recognized. > Usually, async calls will be marked with `await`, which to me seems somewhat easier to spot. On the other hand it's true that the function call itself is just a function call. One nice consequence is that you can call an async function without immediately blocking and waiting for it to finish. For example, let p1 = start_download(); // start two things at once let p2 = start_query(); let file = await p1; // wait for results let result = await p2; Is that possible with OMP syntax? In your proposal, what would happen if you called an OMP async function (one that ends with a `.return`) using `plain.method()` call syntax? What if you call a sync function or method using OMP call syntax? -j
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss