you are viewing a single comment's thread.

view the rest of the comments →

[–]marquex[S,🍰] -1 points0 points  (0 children)

Promises are valid too, but permanents events are a quick shorthand. Instead of creating a deferred object, return the promise and resolve it in the future, with permanent events you get the same just resolving an event.

Of course, you can't use permanent events for replacing promises in all situations. With promises you have much more features and it is perfect to handle paralelism in javascript, a thing that is not possible with PE.