On Mon, Jan 4, 2016 at 9:01 AM, Domenic Denicola <d...@domenic.me> wrote:
> From: Kevin Smith [mailto:zenpars...@gmail.com]
>
>> And what's the deal, is it canceled or cancelled?  : )
>
> This is kind of the worst. Previous discussion at 
> https://github.com/promises-aplus/cancellation-spec/issues/4.
>
> Data seems to favor cancelled:
>
> - 
> https://books.google.com/ngrams/graph?content=canceled%2Ccancelled&year_start=1800&year_end=2020&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccanceled%3B%2Cc0%3B.t1%3B%2Ccancelled%3B%2Cc0
> - http://www.google.com/trends/explore#q=cancelled%2C%20canceled&cmpt=q
> - http://www.googlefight.com/canceled-vs-cancelled.php

The best approach in cases like this is to avoid the word altogether.
The fact that there's confusion at all means people will mess it up
and get annoyed, even if there's a "winner" in overall usage.

On Mon, Jan 4, 2016 at 9:36 AM, Kevin Smith <zenpars...@gmail.com> wrote:
>> I am also unsure when .whenCanceled is necessary
>
> Maybe in the case where you have a promise-returning function and you want
> to reject the returned promise upon cancellation.
>
>     function delayWithCancel(ms, cancelToken) {
>       return new Promise((resolve, reject) => {
>         setTimeout(resolve, ms);
>         cancelToken.whenCancelled(reject);
>       });
>     }

Yes, forcing people to poll an attribute of a Promise-like thing is
kinda ridic. ^_^

~TJ
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to