Re:How many keywords I can fit into a single C# expression?
by victorNicollet on Thursday February 07, 2019 @07:29AM
(#19104780)
Given the rule:
An expression may start with a sequence 'if if if if ...' of arbitrary length (and will contain that same number of 'then' and 'else' keywords, although not as a sequence).
[ Parent
| on HN ]
Re:How many keywords I can fit into a single C# expression?
by FBT on Thursday February 07, 2019 @07:55AM
(#19104886)
A simpler variation of the same concept is to use the fact that for every expression `expr`, `do expr` is a valid expression, allowing you to start a sequence with any number of `do`s.
But the challenge as I see it is to stack as many distinct keywords in a row. In javascript you can do the same thing with `await`: for every expression `expr`, `await expr` is a valid expression, so you can start with a sequence of any number of `await`s. That's great, but ultimately not a challenge: the real puzzle is in stacking as many unique keywords as possible.