develooper Front page | perl.perl5.porters | Postings from September 2011

[perl #89032] utf8-bracket support

Thread Previous | Thread Next
Father Chrysostomos via RT
September 11, 2011 14:15
[perl #89032] utf8-bracket support
Message ID:
On Sun Sep 04 13:20:10 2011, tom christiansen wrote:
> "Father Chrysostomos via RT" <> wrote
>    on Sun, 04 Sep 2011 12:15:50 PDT: 
> >How do you defined ‘unused’? How many people know what version of
> >Unicode their perl and their editor (actually, their fonts) are using,
> >or whether they are even the same? What if I use a new character as a
> >delimiter, not realising that perl considers it to be ‘unused’,
and the
> >next upgrade will break my script?
> I don't understand what you're so worried about.  The Unicode
> Pattern_Syntax character property has strong stability guarantees.  

The stability guarantees do not guarantee anything if one’s editor and
one’s perl installation have differing Unicode versions.

> Why not use just the open/left thingies in BidiMirroring that are 
> pattern syntax as openers and the corresponding mirrored bit for 
> closers?  Point this at BidiMirroring.txt...

My point was that I might not be trying to use paired delimiters at all.
 If I have shiny new fonts with something that looks like a nice
delimiter as the glyph for U+10F001 (some time in the future), but my
perl installation has the *previous* version of Unicode (before the one
that introduced U+10F001), then a perl upgrade may break my code if it
turns out U+10F001 is one of those paired delimiters and I was not aware
of it.

This is not FUD, either, as there was a CPAN module that had to change
to work in 5.14, because of the way Unicode identifiers are parsed.

So use of any Unicode (non-ASCII) outside of comments and strings is
going to cause problems.  I don’t know of an elegant solution to that,
but until we have such a solution, I don’t think we should spread the
problem further by introducing paired delimiters.

Actually, I do have an elegant solution:  Provide a plug-in mechanism
that allows *modules* to do their own delimiter pairing.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About