Oops... Used to Node world. I didn't really test it, since I replied by
phone.
On Wed, Aug 12, 2015, 10:46 Salvador de la Puente González <
sa...@unoyunodiez.com> wrote:
> AFAIK, this wont work because what clearTimeout() is actually expecting is
> the id returned by setTimeout().
> El 12/8/2015
This was assuming an API like addEventListener/removeEventListener, not the
standard DOM setTimeout/clearTimeout, sorry for the confusion.
On 12 August 2015 at 15:46, Salvador de la Puente González <
sa...@unoyunodiez.com> wrote:
> AFAIK, this wont work because what clearTimeout() is actually ex
AFAIK, this wont work because what clearTimeout() is actually expecting is
the id returned by setTimeout().
El 12/8/2015 16:00, "Nick Krempel" escribió:
> On 12 August 2015 at 02:56, Isiah Meadows wrote:
>
>> ```js
>>
>> let p = new Promise((resolve, reject) =>
>> setTimeout((x => () => x(x))(
On 12 August 2015 at 02:56, Isiah Meadows wrote:
> ```js
>
> let p = new Promise((resolve, reject) =>
> setTimeout((x => () => x(x))(handler => {
> onNotNeeded(() => clearTimeout(handler));
>
> // `return` is to take advantage of TCO
> return doSomethingAsync(err => {
> if (er
For use cases that require named Functions (e.g. recursion), surely it's
not a such a big deal to either assign an Array Function to a variable
first, or use the good old trusty named Function expression or Function
statement.
var recurseExample = () => { recurseExample(); }
var recurseExample =
ted inline.
>>
>> On Tue, Aug 11, 2015, 21:56 Isiah Meadows wrote:
>>
>> The real reason people need named arrow functions, the biggest use case
>> is for event handlers.
>>
>> ```js
>> let p = new Promise((resolve, reject) =>
11, 2015, 21:56 Isiah Meadows wrote:
>
> The real reason people need named arrow functions, the biggest use case is
> for event handlers.
>
> ```js
> let p = new Promise((resolve, reject) =>
> setTimeout((x => () => x(x))(handler => {
> onNotNeeded(() =>
Sent this too early... Corrected inline.
On Tue, Aug 11, 2015, 21:56 Isiah Meadows wrote:
The real reason people need named arrow functions, the biggest use case is
for event handlers.
```js
let p = new Promise((resolve, reject) =>
setTimeout((x => () => x(x))(handler => {
The real reason people need named arrow functions, the biggest use case is
for event handlers.
```js
let p = new Promise((resolve, reject) =>
setTimeout((x => () => x(x))(handler => {
onNotNeeded(() => clearTimeout(handler));
// `return` is to take advantage of
>
> My proposal is not a keyword, but an hidden variable included at functions
> (e.g. arguments).
> Does arrow functions have any limitations about that?
>
Yes. There are no special contextual keywords reserved within arrow
functions. We've discussed the possibility of a "meta property" for thi
>
> x.map(factorial(x) => do {
> if (x <= 1) {
> 1;
> } else {
> x * factorial(x - 1)
> }
> });
>
This has been discussed over the years but there has been very little
interest in making the grammar more complicated. After all, you can alway
parse in general, I don't think this
>> >> would play very well with the async/await proposal
>> >> https://tc39.github.io/ecmascript-asyncawait/ , which wants to have
>> >> arrow functions like
>> >>
>> >> async (x) => ...
>&
general, I don't think this
> >> would play very well with the async/await proposal
> >> https://tc39.github.io/ecmascript-asyncawait/ , which wants to have
> >> arrow functions like
> >>
> >> async (x) => ...
> >>
> >> Be
c39.github.io/ecmascript-asyncawait/ , which wants to have
>> arrow functions like
>>
>> async (x) => ...
>>
>> Because we can't count on async as a keyword, your proposal would
>> create an ambiguity.
>>
>> On Tue, Aug 11, 2015 at 1:49 PM, Ja
roposal would
> create an ambiguity.
>
> On Tue, Aug 11, 2015 at 1:49 PM, Jacob Parker
> wrote:
> > I did look, but couldn’t find anything on named arrow functions were not
> included. I do sometimes find cases where I want recursion inside a class
> function definition, and
would
create an ambiguity.
On Tue, Aug 11, 2015 at 1:49 PM, Jacob Parker wrote:
> I did look, but couldn’t find anything on named arrow functions were not
> included. I do sometimes find cases where I want recursion inside a class
> function definition, and still need access to `this
Woah, an actual application of Y combinator hahaha
https://www.youtube.com/watch?v=FITJMJjASUs
On Tue, Aug 11, 2015 at 7:01 PM James M Snell wrote:
> On Tue, Aug 11, 2015 at 2:21 PM, Tab Atkins Jr.
> wrote:
> [snip]
> >
> > let Y = F => (x=>F(y=>(x(x))(y)))(x=>F(y=>(x(x))(y)));
> >
>
> Aah
On Tue, Aug 11, 2015 at 2:21 PM, Tab Atkins Jr. wrote:
[snip]
>
> let Y = F => (x=>F(y=>(x(x))(y)))(x=>F(y=>(x(x))(y)));
>
Aahh! my eyes! it burns!!!
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Tue, Aug 11, 2015 at 1:49 PM, Jacob Parker wrote:
> I did look, but couldn’t find anything on named arrow functions were not
> included. I do sometimes find cases where I want recursion inside a class
> function definition, and still need access to `this`. Was it just seen as
>
I did look, but couldn’t find anything on named arrow functions were not
included. I do sometimes find cases where I want recursion inside a class
function definition, and still need access to `this`. Was it just seen as
syntax bloat, or were there any complications to implementing it
20 matches
Mail list logo