Hacker News new | ask | show | jobs
by lelanthran 1089 days ago
> Surely anything over a network is async?

Yes, but not everything should be. Synchronous RPC works better than async RPC with fewer failure points simply because there's only single line that is the point of call. Async RPC quickly devolves into a hairy mess.

> Unless you block on every call, which REST doesn't stop you doing.

But the current standards do. If you want `fetch()` to be synchronous, you have to wrap it and fake it.

1 comments

If you want fetch to be synchronous, why not just write await in front of it?

RPC is the same, except you can't opt for async when you want it.