3 ms·
Agree with kebab-case. > Most languages have multiline literals, but what makes the Lua version great is that the beginning and ending marks are different char
by keybored 4y ago
Agree with kebab-case.
> Most languages have multiline literals, but what makes the Lua version great is that the beginning and ending marks are different characters. This solves the infuriating “unnestable quotes” problem string literals have, and you don’t have to escape all your literal \s.
That paragraph also uses “nestable marks”.
- jonasenordin 4y agoNestable comment syntax is also nice. At least some MLs (eg SML) has it, that I know of. Indentation-sensitivity can also solve similar problems. (Indentation does not have to exclude requiring graphic termination. A formal language can require both. Or just a helpful tool.) (Also agree with 'kebab-case', although the name is new to me and a bit weird.)
- lolinder 4y agoWhat makes C-style comments unnestable?
- gpderetta 4y ago/**/ could potentially be nestable, they are just not defined as such.
- funcDropShadow 4y agoThey are defined to be non-nestable. Any appearance of */ terminates the comment.
- still_grokking 4y ago> Nestable comment syntax is also nice. At least some MLs (eg SML) has it, that I know of. Scala has it too. (But OK, Scala is a kind of ML).
- nwellnhof 4y agoFWIW, Raku and XPath support kebap-case. If you really mean subtraction, you have to add whitespace.
- lizmat 4y agoThat works, but isn't necessary in Raku. As long as the right side of the hyphen does not start with an alphabetic character, you're good: my $a = 45; say $a-3; # 42
- unsafecast 4y agoThat's such a perl/raku thing, and I mean it in the best way possible.