4 ms·
Yeah but rust has gotten simpler?
by 32gbsd 4y ago
Yeah but rust has gotten simpler?
- nindalf 4y agoThey're working on it. For example, knowing that you can use async in some contexts (functions) but not in others (traits) is complexity that needs to be learned. By making it work everywhere, the language becomes simpler. But no, there will always be some inherent complexity in the language because it has new concepts not present elsewhere. Newer tutorials in novel formats are being made all the time and they help with learning, but there's no way around having to learn new things.
- candiddevmike 4y agoI thought there was contention within the community about async?
- nindalf 4y agoI think async exists and it works well. There were 2 equally popular runtimes earlier but now there's only 1 that everyone uses. I wouldn't characterise that as contention, just people trying different stuff out.
- galangalalgol 4y agoI still think async/await is a bit of a fad outside web services, and one I can't ignore if I want to use some popular crates.
- vlovich123 4y agoTokio is super popular but there are still better runtimes at the moment. The proper design you want is thread per core with some background pool of threads available for work stealing / batch jobs. The reason is that you can completely remove the need for any locking in your critical path. I think tokio is working on making that paradigm available but I don’t know how that’s progressing
- FridgeSeal 4y agoFor what it’s worth, Glommio is thread-per-core async executor library in Rust. Comes with io_uring support too. Not as widely supported as tokio is, obviously, but still viable enough, worth keeping an eye on IMO.
- vlovich123 4y agoYes that’s what I was referring to. I’m using that. ByteDance has a similar one although I haven’t tried it. The annoying thing is how deeply a specific async implementation “infects” all parts of the code. Would be nice for something more general so I could more easily test out individual implementations to compare performance vs having to rewrite a good chunk of the application.
- FridgeSeal 4y agoOh cool. Yeah I 100% agree, more executor-neutral API’s would be amazing. Especially for stuff like networking client libs, I wish hyper, Axum, tower, tonic, etc were all executor-neutral, or at least provided executor specialisations via features or something.
- timeon 4y agoFor me, everyday.