I was somewhat surprised to observe that the following code
# comment
say 1;
# comment
say 2;
# comment say 3;
# comment say 4;
prints 1
, 2
, 3
, and 4
.
Here are the relevant characters after "# comment":
say "
".uninames.raku;
# OUTPUT: «("PARAGRAPH SEPARATOR", "LINE SEPARATOR", "<control-000B>", "<control-000C>").Seq»
Note that many/all of these characters are invisible in most fonts. At least with my editor, none cause the following text to be printed on a new line. And at least one (<control-000C>
, aka Form Feed
, sometimes printed as ^L
) is in fairly wide use in Vim/Emacs as a section separator.
This raises a few questions:
- Is this intentional, or a bug?
- If intentional, what's the use-case (other than winning obfuscated code contests!)
- Is it just these 4 characters, or are there others? (I found these because they share the mandatory break Unicode property. Does that property (or some other Unicode property?) govern what Raku considers as a newline?)
- Just, really, wow.
(I realize #4 is not technically a question, but I feel it needed to be said).