Re:Async-await on stable Rust
by pixel_fcker on Thursday November 07, 2019 @01:36PM
(#21475931)
Or maybe there are just a lot of people who like using rust because it fits their use cases very well and are excited about the release of a big new feature that’s been in development for a long time?
[ Parent
| on HN ]
>...because it fits their use cases very well and are excited about the release of a big new feature.
a bit too excited. GP isn't wrong, Go pretty much has the same thing and I have never seen so much fanboyism for a single feature ever in my career.
I don't get it, but that might be because I am a manager.
https://github.com/jeff-davis/postgres-extension.rs
See my example where a pure-rust postgres extension can start a background worker, listen on a port, and handle concurrent network requests, multiplexing them over a single backend calling a non-thread-safe internal postgres API.
That's possible because rust has no runtime to get in the way, it can use C structs natively and seamlessly, tokio offers the CurrentThread runtime (which doesn't spawn new threads), and a bunch of other details that need to be done right.
Try doing that in a pure-Go postgres extension.
Go and Rust are completely different in many ways. It's kinda like you're asking why someone would want a hybrid minivan when they've been making hybrid sedans for over 10 years.
Go's is a little different. I can't run Go on something with 2k of RAM like an Arduino, but Rust's async structure is actually extra helpful there.
Can Rust's async even work on an Arduino or any bare-metal system?
Re:Async-await on stable Rust
by steveklabnik on Thursday November 07, 2019 @06:58PM
(#21478753)
Yes. Right now the implementation requires TLS but that will be going away.
To whoever downvoted Steve, he's talking about thread local storage, not transport level security.
Re:Async-await on stable Rust
by steveklabnik on Friday November 08, 2019 @10:52AM
(#21483336)
Thanks for the clarification! I didn't even notice I was downvoted, and now you're downvoted... I don't get it.
HN be a harsh mistress.
I'm pretty sure "a lot of people" here never go past a "Hello World" project in Rust.
I'm pretty sure you're wrong like the way you're sure that you're right. Can you elaborate on why someone can't even go past a "Hello World" project would care about a feature that "other languages" have had it in years? I don't get it, I think they maybe hate Rust and should go throwing shade the language and ruin other people's feelings instead.