Skip to content

Feature Request: recognize "doubled" Unicode characters in Raku ternary operator (question mark and exclamation point). #433

Open
@jubilatious1

Description

@jubilatious1

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 == 1True !! 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fallbackIf no other label fits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions