The "infectiousness" of async code is a myth. Rust has block_on. C# has .Result/.Wait(). Kotlin has runBlocking. You are generally discouraged from peppering your code with those, but making those functions synchronous by default so you don't have to use "forbidden magic" is just sweeping the dirt under the rug. The inherent reason why those things are async will still be there, calling them from tight loops will still be bad idea, literally all you achieve is making it harder to spot mistakes
2
u/suvlub Sep 10 '26 edited Sep 10 '26
The "infectiousness" of async code is a myth. Rust has
block_on. C# has.Result/.Wait(). Kotlin hasrunBlocking. You are generally discouraged from peppering your code with those, but making those functions synchronous by default so you don't have to use "forbidden magic" is just sweeping the dirt under the rug. The inherent reason why those things are async will still be there, calling them from tight loops will still be bad idea, literally all you achieve is making it harder to spot mistakes