Working in async world is not completely new to me, I’ve developed some stuff in HaXe targetting the Flash runtime and I’ve developed a kiosk application using QML for the interface. Promises are a big step forward:
apply is good for calling a function with list of arguments that you are computing. For instance, maybe you want to get a list of files to copy, then copy all the files and after all that is finished you want to do something else.
And I used
bind to make a functor that I can pass to be called.
There’s something more magic hiding with
bind - you don’t need to pass all the arugments. They call it currying, I think no amount of code can compare with a proper Durban curry.
Obviously there are lots more that I need to catch up on and learn!