Promises: final steps

Mark Miller erights at gmail.com
Thu Sep 5 10:27:12 PDT 2013


On Thu, Sep 5, 2013 at 1:21 PM, Kevin Smith <zenparsing at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
  Cheers,
  --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130905/08449f0f/attachment-0001.html>


More information about the es-discuss mailing list