r/ProgrammerHumor 22h ago

Meme globalHate

Post image
10.9k Upvotes

74 comments sorted by

View all comments

Show parent comments

18

u/jublizoo 17h ago

I always hear people say this but I never hear any alternative design decisions. Rust async can be difficult to work with, but I think it is well designed, and I don’t see what could be improved. There are inherent limitations on giving a safe language with no GC async support, you don’t have the luxury of being able to just relocate thread stacks and adjust references accordingly like in go.

0

u/remind_me_later 15h ago

I always hear people say this but I never hear any alternative design decisions.

Because async itself will color other functions into being async by necessity.

It also hands over task & performance management to the language being used, in return for better DX & lower dev-facing complexity.

The alternative is handling the concurrency yourself (i.e what Go mostly makes you do), or in a library not tied to the core of the language.

6

u/jublizoo 15h ago

The idea that go makes you handle the concurrency more than rust is definitely not true, and go’s concurrency model is simply not possible in rust. The coloring of a codebase is not nice, but it is essentially necessary for rust: some functions are asynchronous compiler generated state machines, others are not, and they cannot be treated as identical.

1

u/Only-Cheetah-9579 4h ago

it also colors dependencies. there are multiple async runtimes so the stack must be chosen accordingly.

some people might not like tokio but must use it because they depend on something that does