Re:Syncify.js – Eliminates the need for callbacks in the bro...
by eagsalazar2 on Sunday May 10, 2015 @02:46PM
(#9520887)
Promises are better than callbacks but far worse (in terms of complexity they create) that synchronous code. This might be fairy dust but it crushes promises for reducing developer cognitive load. Having said that I agree with the person who commented that async/await is a better way to go (although sadly not really an option in CS yet).
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by modarts on Sunday May 10, 2015 @09:19PM
(#9522175)
Why would someone invest in Coffeescript at this point with ES6 + Babel being a highly viable option?
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by monsieurbanana on Sunday May 10, 2015 @06:36PM
(#9521681)
Sorry could you explain what CS is? I can't think of anything besides computer science.
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by seeekr on Sunday May 10, 2015 @09:05PM
(#9522140)
CoffeeScript! :-) One of those neat compiles-to-JS languages!
Edit: And the "problem" with async/await and CoffeeScript is that the former is currently available in various JS transpilers but you can't use one of those and CoffeeScript at the same time.
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by beejiu on Sunday May 10, 2015 @01:14PM
(#9520556)
> once you adopt Promises a large portion of your code will have to be tailored to use it.
This isn't a necessity, since you can create a function which both returns a Promise and accepts a callback. Most Promise libraries make this easy to support, which makes it easy to introduce Promises into projects that already use callbacks, and vice-versa.
I guess what you're trying to say is that once you adopt Promises a large portion of your code will have to be tailored to use it.
To which I respond: .. yes, so what? It's better than callbacks. And it's better than some "magic fairydust" that doesn't make it explicit that you're doing something async.