News for hackers. Stuff that matters.
Re:Announcing Async-Std 1.0 by Matthias247 on Monday November 11, 2019 @09:28PM (#21510997)
> you could have a macro of sorts that just lets you write the sync version and have it generate the async version

That sounds like a good idea in theory. In practice you will discover that async is a bit different. E.g. you can't have recursive functions, some new lifetime effects will come into play (an async fn returns a Future, and everything that generated Future captures lifetimes of other things).

async/await made async programming in rust definitely a lot more accessible! But at some times the lower layers still leak through and cause some unexpected compilation errors.

Re:Announcing Async-Std 1.0 by ecnahc515 on Wednesday November 13, 2019 @05:31PM (#21530420)
Thanks for the explanation. I was curious what specific flaws there would be in such a design, and what you said makes sense. Perhaps something doable with more thought and features to support it in the future!