Skip to content

Comment on Sane Async Patterns in JavaScript

Comments

Promises are about as clean as you can get in a purely async environment.

Yet, notice how no one shows off how easy it is to write a loop. Oh, and what happens when your code throws an exception? It's as though that path halted forever.

Also, what happens when you have a method defined as

result = foo(args);

that now needs to perform an async operation? Enjoy refactoring every call site.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.