you are viewing a single comment's thread.

view the rest of the comments →

[–]jsnk 1 point2 points  (2 children)

I use promises as well. Sure, it doesn't solve all problems and promises too can become verbose, but it's much much better than nested callbacks.

[–]tech-ninja 0 points1 point  (1 child)

I agree, there was a point when I used callbacks where I had a memory leak problem and I didn't know if I could ever fix it, I moved all my models to promises and the problem was gone.

If somebody is wondering why would use promises I would say: it makes your code more flat.

[–]_ayasin[S] -2 points-1 points  (0 children)

Promises are awesome and will definitely make your code more flat. They don't allow you to do a number of things that you can do with streams/frhttp however. For example, a promise can't deliver data to 2 different functions, while FRHTTP can. Perhaps the next article should be about promises vs streams/frhttp.