Lu Wilson
04/09/2023, 11:07 AMguitarvydas
04/09/2023, 12:05 PMLu Wilson
04/09/2023, 12:06 PMwtaysom
04/21/2023, 7:36 AM%{hello, world}
instead of "hello, world"
.guitarvydas
04/21/2023, 8:20 AM%{hello, world}
accepted syntax in some language? Pardon my ignorance… @wtaysomwtaysom
04/24/2023, 2:45 PM%
so:
• %~hello, world~
• %$hello, world$
• %#hello, world#
— even though #
usually marks comments.
Some symbols pair as brackets though:
• %{hello, world}
• %[hello, world]
• %<hello, world>
Gnarly. And let's not start into Here Docs except to say they they're a fun exception to the rule that expressions in programming languages nest.
Though less baroque, Lua has its own cute string literals with double bracket [[hello, world]]
that you can put in a bigger literal by using equal signs, [==[we want to bracket [[hello, world]] somehow]==]
and then [=====[we can go deep when [==[we want to bracket [[hello, world]] somehow]==] by adding more and more equal signs]=====]
. The only rule is that the closing bracket has the same number of equal signs as the opening bracket. So it's not like these things are nesting or anything silly like that.