Many years ago, I ran a contest on the @ChakraCore team to find the longest sequence of keywords syntactically allowed by JavaScript. There were two brackets: with ASI, and without ASI. Here are the results:
-
Show this thread
-
The winner of the without ASI bracket was Arjun Bijanki (I think
@arjunb_msft, but he doesn't tweet) with this 15 keyword beauty:pic.twitter.com/qNvAhN1yWL
3 replies 22 retweets 101 likesShow this thread -
@iwjh got honorable mention in this category with a 13 keyword entry that managed to run without error as well (thought it doesn't do anything useful):pic.twitter.com/oTogMbGuzF
1 reply 2 retweets 14 likesShow this thread -
And the epic winner of the ASI bracket was
@iwjh with this 19 keyword monstrosity:pic.twitter.com/OvTbzdrsOs
9 replies 11 retweets 57 likesShow this thread -
The rules were: * Must parse (plus pass static semantics checks), but can fail immediately at runtime. * Cannot repeat keywords * Puncutators or other non-keyword syntax resets the keyword counter * You can use as much preamble and postamble as necessary
1 reply 1 retweet 6 likesShow this thread -
Oh, and `this`, `null`, and `undefined` were considered keywords even though they aren't technically keywords. It made the contest more fun (plus editors color them as keywords so it makes some sense).
2 replies 1 retweet 12 likesShow this thread
I would pay good money to attend a dramatic reading session of these gems
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.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.