rust-lang / wg-async

Working group dedicated to improving the foundations of Async I/O in Rust
https://rust-lang.github.io/wg-async/
Apache License 2.0
379 stars 88 forks source link

learning async rust for the first time #46

Open nikomatsakis opened 3 years ago

nikomatsakis commented 3 years ago
nikomatsakis commented 3 years ago

This comment from reddit seems like related data:

$0.02

I've been both a c++ developer and a developer in a gc language, and I've previously gotten as far as writing a sudoku solver in rust, but no further. It had some enums, but generally avoided most issues of borrowing with bitpacking into a fixed sized object and copying.

I check in on rust every now and again and would like to write more in it, but eventually most of my problems need async solutions.

However, I bounce off rust every time, usually at a point where I'm ok with basic syntax. At that point I've either looked for something i can get my teeth into to that forces me to confront lifetimes, or I started looking for async docs to do something useful and saw that they were at the time largely left as to-do in the rust book (iirc).

The impression that async isn't ready knocks the motivation out of me. I'm looking for a solution, not a work in progress, and I don't have a pressing problem that requires me to solve it in rust.

I would personally appreciate programming problems that help me to explore a concept, because i feel they are harder to compose yourself in rust. I tried out some things like coding game, but the problems weren't really forcing me to focus on a language concepts

nikomatsakis commented 3 years ago

Some elements of this blog post feel related:

https://kevinhoffman.medium.com/rust-async-and-the-terrible-horrible-no-good-very-bad-day-348ebc836274

Lesson I — The Rust language does not include any intrinsic high-level means to poll futures. That is left as an “exercise for the reader”

Lesson II — It is possible for a single dependency of your crate to be so tightly coupled to a future polling runtime that it effectively makes that runtime mandatory for all consumers.