We'll get it on the next TC39 meeting's agenda.
/be
On Mon, Feb 22, 2016 at 5:28 PM Alan Johnson wrote:
> If this is done, please go with `async do { … await … }`. May as well
> reuse existing syntax as much as possible. As mentioned, `<-` is
> problematic both from the
If this is done, please go with `async do { … await … }`. May as well reuse
existing syntax as much as possible. As mentioned, `<-` is problematic both
from the standpoint of conflict with existing operators and incomplete analogy
with Haskell. If the result should be Promise-ified, best to
On Sun, Feb 7, 2016 at 9:07 AM, Raphael Mu wrote:
> The ES Promise is an instance of Monad, a property that implies a much more
> concise and expressive syntax for using Promise, by exploiting its monadic
> properties. I've seen a lot of people complain about Promises
On Tue, Feb 9, 2016 at 10:28 PM, Isiah Meadows wrote:
> let finalPromise = (async () => {
> let x = await promiseA
> let y = await promiseB
> let c = f(a, b)
> return g(a, b, c)
> })()
I think it's important to keep the async/await keywords because they
give a
There is kind of a `do`-like syntax for Promises: async functions. To
borrow Tab's example:
```js
let finalPromise = (async () => {
let x = await promiseA
let y = await promiseB
let c = f(a, b)
return g(a, b, c)
})()
// or in parallel
let finalPromise = (async () => {
let [x, y] =
I see little to be gained, and it's not clear that it's in a different
context. Plus, assuming your editor balances parentheses and auto indents,
I see no more than about 8-10 keystrokes saved for something that isn't
super frequently used. Not saying it's a bad idea, but ES has gotten to the
Why not just use await within `async do`?
On 12:19PM, Sun, Feb 7, 2016 Rick Waldron wrote:
> What does this do?
>
>
> let finalPromise = do {
> let a;
> a <- b;
> }
>
>
> Currently, that's an expression that means "a less than negated b"
>
> Rick
>
> On Sun, Feb 7, 2016
Since the non-monadic way won, I don't know that it is worth arguing about
why. But it is ergonomic issues much deeper than convenience, and much more
important than compatibility with existing libraries -- even if those two
were adequate considerations by themselves.
The behavior of promises was
And draft ES6 tried for monadic, but compatibility with Promises libraries
(more than "convenience") prevailed.
/be
On Sun, Feb 7, 2016 at 11:35 AM Raphael Mu wrote:
> In theory it's possible, but Promise.resolve automatically joins Promises
> for the sake of
M extension that performed auto
> boxing/unboxing on Promises, achieving a similar result without the need
> for additional syntactic constructions
>
> > --
> > monadic extension to do-notation
> > From: Raphael Mu <encryptedre...@gmail.com>
> > Date: 7 Feb,
What does this do?
let finalPromise = do {
let a;
a <- b;
}
Currently, that's an expression that means "a less than negated b"
Rick
On Sun, Feb 7, 2016 at 12:07 PM Raphael Mu wrote:
> The ES Promise is an instance of Monad, a property that implies a much
> more
In theory it's possible, but Promise.resolve automatically joins Promises
for the sake of ergonomics.
On Sun, Feb 7, 2016 at 1:15 PM Jordan Harband wrote:
> How is Promise an instance of Monad, if you can't ever have a Promise of a
> Promise?
>
> On Sun, Feb 7, 2016 at 9:59
The ES Promise is an instance of Monad, a property that implies a much more
concise and expressive syntax for using Promise, by exploiting its monadic
properties. I've seen a lot of people complain about Promises having too
clumsy a syntax, and likewise for async/await.
We now have the
The `a < -b` issue could be solved by using a different operator, like ` wrote:
> Why not just use await within `async do`?
>
> On 12:19PM, Sun, Feb 7, 2016 Rick Waldron wrote:
>
>> What does this do?
>>
>>
>> let finalPromise = do {
>> let a;
>> a <- b;
>> }
>>
>>
>>
ons
--
monadic extension to do-notation
From: Raphael Mu <encryptedre...@gmail.com>
Date: 7 Feb, 17:07
To: es-discuss@mozilla.org
The ES Promise is an instance of Monad, a property that implies a much more
concise and expressive syntax for using Promise, by exploiting its monadic
propert
How is Promise an instance of Monad, if you can't ever have a Promise of a
Promise?
On Sun, Feb 7, 2016 at 9:59 AM, Raphael Mu wrote:
> The `a < -b` issue could be solved by using a different operator, like
> `
> On Sun, Feb 7, 2016 at 12:35 PM Kevin Smith
16 matches
Mail list logo