promised-io icon indicating copy to clipboard operation
promised-io copied to clipboard

jQuery deferred object-like syntax

Open tomkit opened this issue 12 years ago • 1 comments

I wrote a quick wrapper API around whenPromise() to be more like jQuery's deferred object syntax: https://github.com/tomkit/promised-io-deferred. Would love to get people's thoughts on the pros/cons of the different syntax styles. Personally I found myself being lazy with anonymous functions with whenPromise() and it leads to having more nested code.

tomkit avatar Dec 13 '12 22:12 tomkit

:+1:

Don't know if it is about the Promises/A spec, but I found the suggested methods very demanding in terms of development cycle. The jQuery deferred style implies a really rapid coding style.

Me and my team loves to do .done() on development along with some initial .fail(), then start to add more .fail()s at the debug stage, we already found this approach very constructive.

vicary avatar Apr 02 '13 13:04 vicary