3 ms·
Wouldn't it be desirable to replace async with sync, then? I'd rather dirty the signatures of blocking/synchronous methods then of the rest.
by dleslie 7y ago
Wouldn't it be desirable to replace async with sync, then?
I'd rather dirty the signatures of blocking/synchronous methods then of the rest.
- Cyph0n 7y agoUnlike JS, most languages, including Rust, are not async by default, so this would not make sense.
- dtech 7y agoHow is JS async by default?
- steveklabnik 7y agoWhen people say this, they usually mean "a significant amount of things JavaScript is used for are asynchronous, and IO is virtually always asynchronous," rather than something more literal. The language has asynchronicity deep in its bones, even if it's not entirely made out of it.
- PJDK 7y agoThat would make a lot of sense, but wouldn't be very practical to add in to an existing code base.
- dtech 7y agoSync is still much more common than async. I'd rather write `await { httpCall }` than `blockOn { 1 + 1 }`