// Alternate timeline async/await var [err, res] = await foo() if (err) return err
-
-
This Tweet is unavailable.
-
Polymorphic arguments don't optimize well though; this would probably kill performance unfortunately :(
End of conversation
-
-
-
ohhh we had it, for a long time actually, it was bad. Callback pattern you'd see everywhere: function(err, res) { if (err) { return ... } // expected flow here
-
Respectfully disagree this is the same & this is bad.
- 1 more reply
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
this would be soooo rad
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I've always thought that the Go-ish style from your first tweet is nice! Luckily it can be achieved with a helper/util :)
-
Except the consumer might not quite expect an error to be returned, of course...
End of conversation
New conversation -
-
-
I don't do async/await, but if I did, this would be my take on it. const {success, data} = await foo() if(!success) { console.error(data) return } console.log('success:', data)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.