| > A remote call fails, the error propagates up the call stack, and someone gets an error message. Uh-huh, but did the message actually get through? Can they safely just retry? These are very uncommon failure modes on local systems but very common on networked systems. Without a proper stateful abstraction beyond just "procedure call", like a promise, you can't address these failure modes properly. > In the rare case you need to harden a particular call, you add caching or retries or whatever other logic fits your use case Which now makes your system nondeterministic like I said. > Even javascript added await because it's better to pretend that async code looks synchronous Yes, linear code is easier to read. I don't see what this has to do with anything. The use of promises and await indicates a possibility of failure semantics that would otherwise not be apparent in the program's control-flow. Yes, you can superficially make this look like synchronous code, but it's not synchronous code. |
...
> The use of promises and await indicates a possibility of failure semantics that would otherwise not be apparent in the program's control-flow.
They don't, though. They don't indicate if the message got through. They don't indicate if you can safely retry. Their failure mode is exactly as opaque or as transparent as synchronous calls.
The reason for their existence and mandatory use in Javascript is due to a deficiency of the platform (single thread, so all synchronous calls block).
If the platform was better they would never have existed.