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

Re: Registry for proposed new regex modifiers; was: Optimizing qr/STRING/msixpodual for amusement

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
February 21, 2011 09:50
Subject:
Re: Registry for proposed new regex modifiers; was: Optimizing qr/STRING/msixpodual for amusement
Message ID:
309.1298310571@chthon
>> Here are the ones I can think of at the moment:
>>
>>  /w to change the meaning of \b to Unicode's word boundary algorithm.
>>  /k to change /i to mean compatible decomposition

> Please don't use /k. Having /k means '(?k:)' becoming valid, and that
> will interfere with Regexp::Common, which uses '(?k:)'. /p started out
> as /k, and it was changed to /p as to not interfere with Regexp::Common.

The first thing that comes to mind is: do you have an alternate suggestion?

As for Regexp::Common, UGH!  I have rather mixed feelings about that.  

It's not even a module in the core Perl distribution, and yet its use of a
syntax reserved to the core blocks progress in that direction.  How many
others like this exist?

On the other hand, adding /k would suddenly change the behavior of 
existing programs through no fault of their owners.  As frustrating 
though this may me, it seems a real blocker, and I fear you're right.

But it is a very natural thing to use.  

We can't really try for /N:k and /N:d because those don't embed cleanly as
(?N:k:stuff).  Plus it's a problem for N:c and N:kc, since :k and :c mean
separate things and having :kc mean something else is pretty dodgy.

I wonder how to squeeze NF:D NF:C NF:KD NF:KC in.

I do *not* think it's time to go to :NF<KD> or such.

Hm, verbs? (*NFKD)  That seems extensible.  Not sure I care
for it though.  Seems important enough for a /switch.

--tom

Thread Previous | 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