dvshkn,
@dvshkn@fosstodon.org avatar

The difference between using async/await in typescript vs is that the rust compiler routinely asks "are you sure about that??"

More times than not it's a good thing.

zalasur,
@zalasur@mastodon.surazal.net avatar

@dvshkn I'm not entirely sure about that. async/await can certainly be abused but they themselves aren't harmful. It's just a coding pattern.

My only main gripe with them is that they tend to hide implementation of the underpinnings of how a Promise is supposed to work. This is by design, of course, but too many developers just throw them around without proper flow control or error handling. Or worse, they don't realize that an async function returns a Promise at all.

dvshkn,
@dvshkn@fosstodon.org avatar

@zalasur Oh that was not meant to be a knock against async/await. More that the extra rules in Rust are making me slow down and think through the data flow more, which is a good thing when dealing with concurrency. Hopefully some good habits will carry back over to my TS work also.

zalasur,
@zalasur@mastodon.surazal.net avatar

@dvshkn Oh absolutely. 🙂

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • megavids
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • JUstTest
  • lostlight
  • All magazines