@yoshuawuyts you can access APIs without functions, but I think we're getting off track here.
-
-
Replying to @jaffathecake
@yoshuawuyts my point was "functions are the lowest level" doesn't hold up as a complete argument here2 replies 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake but that leaves me in a rhetorical deadlock. Truth is, functions are the most convenient, low level way of accessing most APIs1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts agreed. I'm still missing something here. No one's saying fetch() should stop being a function.1 reply 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake wait, is all of this all a big misunderstanding? Are you saying I can use fetch / SW without promises & implicit catch?1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts when you say function, do you mean callback? Because fetch() is a function, whereas in fetch(url).then(fb), fb is a callback2 replies 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake oh yeah, I meant callback. Errback preferably even1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts they swallow errors too. If you don't add a callback, you don't hear about it.1 reply 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake but they will never swallow errors they were not meant to swallows, which is what promises do1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts fetch(url).then(r => r.json()) - if this fails I get a console error, and a window level event. Same as errback.1 reply 0 retweets 0 likes
@jaffathecake but if I do an assertion in any of the code that follows its incorrectly caught. I treat throw as exceptions, not user errs
-
-
Replying to @yoshuawuyts
@yoshuawuyts if these errors aren't caught, where do you want them to end up? What do you want the end result to be?0 replies 0 retweets 0 likesThanks. 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.