4 ms·
Here's a Rust example, with tokio: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=825256f548eb9bb5df528704867f80fd https://play.rust-la
by fasterthanlime 4y ago
Here's a Rust example, with tokio: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=825256f548eb9bb5df528704867f80fd https://play.rust-lang.org/?version=stable&mode=debug&editio... - I don't have time to come up with Java/C++ examples, but I'm sure others will.
(If your point was about it being _built into the language_, then it definitely stands, see the other discussion in the parent comment thread)
- paskozdilar 4y agoYeah, I guess I overestimated the complexity of such mechanisms. I mean, still, you need some kind of runtime for the asynchronicity, but the Rust version seems fairly OK (apart from the function coloring, but that's another story). I guess I just like it being built into the language. Plus no function coloring (everything is asynchronous, but appears synchronous) really makes it easy to build complex systems.