请说明实际差异的例子(例如Bluebird和Q之间).
解决方法
引用规格:
This specification details the behavior of the
then
method,providing an interoperable base which all Promises/A+ conformant promise implementations can be depended on to provide. As such,the specification should be considered very stable. Although the Promises/A+ organization may occasionally revise this specification with minor backward-compatible changes to address newly-discovered corner cases,we will integrate large or backward-incompatible only after careful consideration,discussion,and testing. Finally,the core Promises/A+ specification does not deal with how to create,fulfill,or reject promises,choosing instead to focus on providing an interoperable then method. Future work in companion specifications may touch on these subjects.
以下内容未涵盖:
>创建承诺(这是promise constructor规范).
>承诺聚合(尽管大多数实现支持.all).
>进步(即progression spec,即将被imo替换).
>取消(即cancellation spec).
>未处理的拒收监测(没有规格,但有检查讨论).
>堆栈跟踪.
蓝鸟和Q等都是完全承诺/投诉,但在很多方面有所不同:
>接下来的Q,v2介绍了估计,Bluebird打算最终贬低进度,喜欢像C#的IProgress这样的东西.
>创建承诺通常在Q中使用延迟(尽管现在提供承诺构造函数变体),Bluebird鼓励承诺构造函数.
Bluebird具有更强大和更强大的应变能力,使整个回调API在单个命令中承诺. Q作者Kris建立了Q-IO,它手动承诺文件系统和http模块.
Bluebird允许通过.bind绑定这个值并承诺数组方法(.map,.reduce,.filter等).
> Q具有异步队列的原语,通过Q连接考虑RPC,
蓝鸟的速度大约是100倍,堆叠轨迹更好,自动的未处理的拒收检测.它每次承诺也消耗了很少的RAM内存.