Async / await update

Is there any plan to provide an updated version with async / await? or at least have a section in the Async chapter about it?

This is the biggest ever improvement to Swift on the server and Vapor IMO and I think it would make a huge difference if the best resource for Vapor was updated for it.

Even just a small mention of async await and its amazing ease of use with a link to the vapor async docs will massively help new comers to Vapor. This would be particularly helpful before Black Friday and holidays when people may have time to start learning Vapor.

We need more people using Vapor and Async Await could be the catalyst in bringing more people over to it.

3 Likes

actually i am waiting to buy because of that missing infos & i want a PDF to read it with papersapp

Yes we probably will put an update or addendum out. Just waiting for the dust to settle on async/await and things like logging and async-http-client to support it first!

5 Likes

Awesome, that would be amazing! Keep up the great work

I bit the bullet and bought it as I had already watched the WWDC-2021 videos on the topics multiple times. Not to say that I wouldn’t face trouble in practice :sweat_smile:

I think that Vapor does a good enough job at going through the changes here https://docs.vapor.codes/4.0/async/

I have found that the Vapor team has put together some rather elegant ways to switch to async/await. They have good documentation at their website, https://vapor.codes. The good news is you don’t have to convert everything. I have handlers that return a type in the same controllers that return a future. (I found learning the process starts with converting a handler from returning a future to returning a type, making it async and throwing, and then solve the resulting compile errors.)

From what their blog says, they’re addressing making their API more align with async/await. And of course, as Tim says, the RW materials are bound to reflect this.

I’m glad we waited :sweat_smile:

To clarify - we have some big upcoming changes as we’re going to try and push people to use async/await which means lots of deprecations and warnings! So my current plan is to wait until the big update and see where we are.

1 Like