Okay Javascript question. Is there a more "elegant" / idiomatic / less ()()y way to do this? // This code doesn't need a completion handler unless it fails (async function() { // Some code using awaits runs here })().catch(e => logError("Oh no!") )
-
Show this thread
-
Replying to @mcclure111
In most js engine you can await top level, also js can await non Promise function, so there is no reason to not just use try catch
2 replies 0 retweets 2 likes -
Replying to @shoval_arad
i don't want to await tho i just want to let it complete whenever it completes
2 replies 0 retweets 1 like
Replying to @mcclure111 @shoval_arad
nice work!
I think this may be the solution to the halting program that the universe seems to use
https://daniellefong.com/2008/01/28/incompleteness-and-halting-godel-and-turing/ …
0 replies
0 retweets
1 like
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.