Re: Re: Proposal: use "One More Point" to handle async functions

2016-09-28 Thread Jason Orendorff
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 m

Re: Proposal: use "One More Point" to handle async functions

2016-09-27 Thread Caitlin Potter
> On Sep 27, 2016, at 6:24 PM, Li Xiaolong <898310...@outlook.com> wrote: > > > That’s not necessarily true — `await` in modules may be very different from > > this. > > I don’t know what await in modules look like. It’s still being discussed. I think there are some strong arguments for top-l

Re: Proposal: use "One More Point" to handle async functions

2016-09-27 Thread Caitlin Potter
> On Sep 27, 2016, at 5:23 PM, Li Xiaolong <898310...@outlook.com> wrote: > > Sorry I’m not familiar with es7. But I still thing my OMP is better than > async/await. > 1: the await keyword can only be used in an async function, so each time you > want to await you have to add async before outer

Re: Re: Proposal: use "One More Point" to handle async functions

2016-09-27 Thread Li Xiaolong
Sorry I'm not familiar with es7. But I still thing my OMP is better than async/await. 1: the await keyword can only be used in an async function, so each time you want to await you have to add async before outer function. 2: async/await still use promise to handle async, which is not as clear as

Re: Proposal: use "One More Point" to handle async functions

2016-09-27 Thread Bergi
What you call "one more point" already exists as the `await` keyword and is much more powerful than a limited `.return` operator: Please make sure to be familiar with the topic before making further proposals. - Bergi