i think rust just makes me suffer by forcing paradigms that just dont work with my specialization and the type of programs i write. cant believe ive been writing rust for 3 years now
@angelthorns I tried to write an IRC daemon in Rust. There is so much global state, that it is a painful task to actually do so. You have to basically lock a bunch of effectively global state, gather all the data, perform modifications to the data, queue everything you want to send, release the lock, then send the messages. You have to do it this way because you can't hold the lock across an await boundary (which, to be fair... is the right thing to enforce, because that's asking for a deadlock).
@Elizafox yeah anything that requires global state becomes awful
@angelthorns Yeah, there's arguments to avoid global state, but there are times you cannot avoid it. And when you need to mutate any global or effectively global state (passing state around in a structure you pass everywhere is global state in a trenchcoat), it becomes a nightmare.