Soni: Soni: rust 2020 edition should be called “hindsight edition” and introduce a declarative DSL (think SQL, but for network/async instead of DBs) with the ability to call imperative (normal rust) functions. but defined so that the behaviour isn’t surprising with a bunch of unnecessary and unexpected calls to the rust functions and stuff. nobody likes that part of SQL.

I think this is a good idea, but it may be better as an external addition, or in a different language?

A DSL for async could be super interesting if implemented as a proc-macro which then compiled down to an async fn or to a state machine.

The reason I would object to replacing async/await with this is that it doesn't seem like it'd give a lot of manual control to users. One of the big advantages of rust is how much we can tune things, and DSLs like SQL, while super ergonomic, are not known for allowing manual optimization.

If you're seriously wanting to do this though, have you thought about implementing it as a crate?

You could brainstorm syntax, write something usable, and get feedback - and that'd put the proposal in a much better position if it were to be included in rustc in the future. async/await needed core language support because it has self-referential borrowing and borrow checking which can be much, much more easily done in-compiler than externally. I don't think a DSL would have the same problems - it should be able to work as an external addition.