zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. andrew+hc[view] [source] 2024-01-19 23:05:58
>>lukast+(OP)
I don’t know how different it is from Rust, but in javascript supporting async and sync is smooth as a Swiss watch.

In Python it takes more thinking and structure because async isn’t built in deeply like it is with javascript.

Even so, async versus sync doesn’t feel like a nightmare in either.

Having said that, it depends entirely on how much experience you have with async programming.

Async programming is a mind bender that will throw you completely until it becomes natural. Synchronous programming feels natural and logical and async requires a completely different mental model.

I can understand why anyone forced to do async would hate it. It’s something you have to want to do.

◧◩
2. matt_k+cj[view] [source] 2024-01-19 23:49:10
>>andrew+hc
> in javascript supporting async and sync is smooth as a Swiss watch

How would you solve the problem described in the article in JavaScript? I know `XMLHttpRequest` technically can be used to make synchronus requests, but the behavior is deprecated and is actively being hobbled by browsers.

[go to top]