8
useVim
1y

this could be the final nail in the coffin for me.

so. fed up.

someone came and wrapped all the function with
Promise. And async callback.

LIKE, ALL OF THEM

57 functions.

now you have an extra try catch in it.

YEAH
I counted.

Comments
  • 0
    assuming you're using (neo)vim, as thy name implies, you can easily fix it once and repeat it 56 times using a macro.
  • 1
    @kobenz

    it works, that is the problem. its already in release.

    +6,859 −4,944

    and I don't know what other seniors are doing.
  • 0
  • 1
    They probably added async because they wanted to await and node bitched (legitimately) about it.

    It definitely shows they don't understand what's going on when they return the promise resolve or reject..., which is not needed, not serves any purpose since those two functions return undefined anyway...

    Still, any function that includes networking should be async anyway.
  • 2
    I mean, async is like a virus. It infects everything that touches it.

    Thing is, if you wanna keep the benefits of awaiting, you need to be async. There's no other workaround.
  • 1
    It would make sense if the outer method wasn't async. Now you have to await it twice for no reason.
  • 1
    @spongessuck no, await resolves all nested promised
Add Comment