W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Promises: final steps

From: Mark Miller <erights@gmail.com>
Date: Thu, 5 Sep 2013 13:27:12 -0400
Message-ID: <CAK5yZYg6VQX4-SQqHbvyJjeWUw1yK+XSwmkc-oCyXe3y9BRS4g@mail.gmail.com>
To: Kevin Smith <zenparsing@gmail.com>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, es-discuss <es-discuss@mozilla.org>, "www-dom@w3.org" <www-dom@w3.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Sep 5, 2013 at 1:21 PM, Kevin Smith <zenparsing@gmail.com> wrote:

>
> It's not clear to me why this, or your `Promise.throw`, is better than
>>
>> ```js
>> somePromise.done(...)
>> // or
>> somePromise.then(...).done()
>> ```
>
>
> Not *much* better, I'd say, but IMO a `done` method which accepts a
> callback overlaps too much with `then`, and a `done` method without a
> callback just looks like a wart in need of removal.  : )
>
> Visually, to me, wrapping beats capping.  But that's just me.
>
> In the end, I like neither wrapping nor capping.  In my own work I've
> preferred to define conditions under which certain rejections are
> interpreted as program errors, thereby avoiding the wrapping/capping issue
> entirely.  (I can elaborate if anyone's interested.)
>

Please do.



>
> { Kevin }
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
  Cheers,
  --MarkM
Received on Thursday, 5 September 2013 17:27:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC