I have spent some time looking at the new stuff in Concurrent.pmod
that Grubba has added to 8.1. Mostly it is code relating to the
concept of Promises and Futures which are very popular amongst
JavaScript people these days.
[…]
A bigger problem imho is the difference in how promises are actually
resolved. In JavaScript, the return value of then() is always a *new*
promise which then allows for chaining. In Pike, we return the same
promise object. This means that code like
my_promise->on_success(foo)->on_success(bar)
in Pike would result only in a call to bar() once my_promise is
resolved whereas in JavaScript, foo() would be called and it's return
value would be the input to bar in a new promise.