5
broseph
11d

Neck deep in callbacks and promises.
Fuck this.

Comments
  • 1
    Does await and async help?
  • 1
    @alexbrooklyn Are they still fair game? I thought someone told me they were deprecated... I'm gonna be pissed if they aren't.
  • 2
    Deprecated?! I thought they were brand new
  • 1
    @alexbrooklyn Dude I don't even know! Help meeee!! 🤣
  • 1
    I'm more of a php person, but I thought async and await were the newest and hottest things to avoid callback hell
  • 4
    async and await are brand new.
    There's no need to use a Promise or a callback. The async keyword makes the function return a Promise already and a regular return is a Promise.resolve. A throw is a Promise.reject.
  • 4
    Basically, need to run something asynchronously? Add async. You don't? Don't add it. No need to fuck with Promises as long as you know how to interact with them (await).
  • 2
    @Tayo thanks for the clarification, I was already confused as to why those functions would suddenly be deprecated.

    I love using await since it keeps callback hell at bay
  • 1
    @broseph you better hop on await, bevause this shit makes code 1000x easier to write/read
  • 1
    Meteor.wrapAsync ftw
  • 0
    @d4ng3r0u5 yaaaay more abstraction
    Also relies on callbacks from what I see
    The entire point of async/await is not having any
  • 0
    Highway to callback hell
  • 0
    Promises are here to break. Pun intended
Your Job Suck?
Get a Better Job
Add Comment