Why are callbacks more “tightly coupled” than promises?

前端 未结 5 1070
Happy的楠姐
Happy的楠姐 2021-01-30 06:51

Can you explain me the following phrase (taken from an answer to Stack Overflow question What are the differences between Deferred, Promise and Future in Javascript?)?

W

5条回答
  •  醉话见心
    2021-01-30 07:39

    They aren't, this is just a rationalization that people who are completely missing the point of promises use to justify writing a lot more code than they would write using callbacks. Given that there is obviously no benefit in doing this, you can at least always tell yourself that the code is less coupled or something.

    See what are promises and why should I use them for actual concrete benefits.

提交回复
热议问题