|
|
|
|
|
by platz
4154 days ago
|
|
This is great for one's own projects, but if creating something for more than one's immediate project (i.e. libraries), it forces everyone else to adopt the same style. Maybe those other projects are also using other libraries that don't use promises, so now there is a problem. Do you wrap the other library in promises too, if that is even a viable option for you? Colorness is a problem for the whole ecosystem too. |
|
In practice however most library callback apis resemble the callback contract enough so that one-line promise-wrapping of the entire library is possible.