develooper Front page | perl.perl5.porters | Postings from February 2022

quoting with bidi bracketing characters

Thread Next
From:
Ricardo Signes
Date:
February 3, 2022 03:43
Subject:
quoting with bidi bracketing characters
Message ID:
134ed947-b833-44ca-827b-d6559e6abc7c@beta.fastmail.com
Porters,

A mere seven and a half years ago, I said it would be nice to get more bracketing pairs available in non-ASCII source.  Here's the message: http://markmail.org/message/sfq7ahm3axbivgze

I still think we should do this.

Unicode provides a thing called bracket pairs <https://www.unicode.org/notes/tn39/>.  These are pairs of characters that have an opening and a closing character and can enclose a run of other characters.  Each pair has an opening and closing character.  I think that when processing utf-8 source (under "use utf8") we could treat these pairs as paired delimiters for quote-like operators.  For example
my @words = qw〔 bingo bango bongo 〕;

To match the behavior of ASCII brackets, these would nest.
my $string = q⌜This string contains ⌜ and ⌟ which is fine.⌟;

I can write this up as an RFC if there's general interest.

-- 
rjbs
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About