Open
Description
Unicode provides two characters that can (in combination) be used for Raku's ternary operator:
⁇
DOUBLE QUESTION MARK
Unicode: U+2047, UTF-8: E2 81 87
red double exclamation mark
Unicode: U+203C U+FE0F, UTF-8: E2 80 BC EF B8 8F
ATM, ASCII question marks work but Unicode double-question marks do not:
[0] > 1 == 1 ?? True !! False
True
[1] > 1 == 1 ⁇ True !! False
===SORRY!=== Error while compiling:
Confused
------> 1 == 1⏏ ⁇ True !! False
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop
Same is true for Unicode double-exclamation points:
[2] > 1 == 1 ?? True ‼️ False
===SORRY!=== Error while compiling:
Confused: Found ?? but no !!
------> 1 == 1 ?? True⏏ ‼️ False
expecting any of:
infix
infix stopper
Anyway, I think 1 == 1 ⁇ True ‼️ False
looks really cool.
(...and will look even cooler if we can get the Unicode people to accept a GREEN ⁇
double-question mark).