code to 1 line. Their shared curiosity may be a coincidence; or it
>> may be the language's fault. Presume the latter. It doesn't follow that the
>> answer should be yes. Since all new syntax imposes some mental load on all
>> language users, the answer should be no unless
>> // equivalent to
>>> JSON.parse(str, {reviver: someFunc});
>>> ```
>>>
>> Looks reasonable.
>>
>> Maybe we can simply add another method, say `JSON.parseWithoutPrototype()`.
>> This makes feature detection easier.
>>
>>
>>
>> ___
>> es-discuss mailing list
>> es-discuss@mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
--
- Oli
Olivier Lalonde
http://www.syskall.com <-- connect with me!
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
this has been discussed before.
--
- Oli
Olivier Lalonde
http://www.syskall.com <-- connect with me!
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
t;
>
> On Thu, Sep 29, 2016 at 3:14 PM Michał Wadas
> wrote:
>
>> Similar proposal is already here, do expressions.
>>
>
> Additionally...
>
>>
>> On 30 Sep 2016 12:06 a.m., "Olivier Lalonde" wrote:
>>
>>> I occasionally write IIFE
Do "do expressions" support the "await" keyword?
On Thu, Sep 29, 2016 at 3:59 PM, Rick Waldron
wrote:
>
>
> On Thu, Sep 29, 2016 at 3:14 PM Michał Wadas
> wrote:
>
>> Similar proposal is already here, do expressions.
>>
>
> Additionally..
le to do more complicated stuff with the
> result means inline promise-chaining without having to asyncify your
> whole function!)
>
> ~TJ
> ___________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-disc
> ```
> function* ones(){ while(true) yield 1; }
> var [...a]=ones(); // freezes
> ```
So if that freezes, whats the problem with `[...a, last]`? It would just
freeze as well...
> access to array elements may have side effects
Doesn't `[a, b,...vals]` access array elements?
On Sat, Oct 1, 2016
> On Sat, Oct 1, 2016 at 12:29 PM, Olivier Lalonde
> wrote:
>
>> > ```
>> > function* ones(){ while(true) yield 1; }
>> > var [...a]=ones(); // freezes
>> > ```
>>
>> So if that freezes, whats the problem with `[...a, last]`? It would
M, Caitlin Potter
> wrote:
> > On Oct 2, 2016, at 10:50 AM, Awal Garg wrote:
> >> On Oct 2, 2016, at 9:30 AM, Olivier Lalonde wrote:
> >>> So what's the problem with `[...a, last]` that `[...a]` doesn't have? I
> >>> still don't get it.
>
I have no idea if this has been discussed already but I thought it'd be
nice to have the following syntax sugar for async/await.
The idea would be that any array that follows `await` would be wrapped into
a Promise.all() call. For example, `await [p1,p2]` would be the equivalent
of `await Promise.
I don't think so, what do you mean?
On Wed, Oct 26, 2016 at 12:22 AM, Raul-Sebastian Mihăilă <
raul.miha...@gmail.com> wrote:
> Then Promise.resolve([p1, p2]) should be like Promise.all([p1, p2]) ?
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.
of `Promise`s, *not* an array
> of
> their corresponding completion values.
>
> On Wednesday, October 26, 2016 12:11:36 AM CEST Olivier Lalonde wrote:
> > I have no idea if this has been discussed already but I thought it'd be
> > nice to have the following syntax sugar fo
ou want `await` syntax for `Promise.all`, you'd need different syntax
> for it - and then, what about `Promise.race`? What about other future
> combinators?
>
> On Wed, Oct 26, 2016 at 12:25 AM, Olivier Lalonde
> wrote:
>
>> I don't think so, what do you mean
In the scenario above, you could pass an array of files, or a `Promise`
> that resolves
> to said array; the function accepts both.
>
> On Wednesday, October 26, 2016 1:03:37 AM CEST Olivier Lalonde wrote:
> > I didn't realize `await` could be used on non-`Promise`s,
Sounds like the "do expressions" proposal.
http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions
On Sat, Oct 29, 2016 at 5:32 PM, Yongxu Ren wrote:
> potentially, this syntax can be extended to functions
> ```
> function f() ={stat}
> // is equivalent to
> function f() {return stat}
>
>
15 matches
Mail list logo