develooper Front page | perl.perl5.porters | Postings from December 2010

It may be time to really start thinking of the syntax for regex intersection,difference, and union

Thread Next
From:
karl williamson
Date:
December 22, 2010 21:03
Subject:
It may be time to really start thinking of the syntax for regex intersection,difference, and union
Message ID:
4D12D7C6.8070808@khwilliamson.com
I'm willing to add this for 5.16 if we can come to agreement on the syntax.

One possible scenario is that we use legal, but essentially nonsensical 
syntax to specify these operations.  One example is to possibly use 
[...&&...] to mean intersection, as some language does; I can't recall 
who.  Having '&&' in a bracketed character class is legal, but it's 
effect is no different from the more clearly expressed single '&'.

This could be handled, if that's what the consensus comes down to, by 
deprecating a doubled & in character classes in 5.14, so that 5.16 could 
take that over.  I'm not necessarily advocating that, but if it is the 
decision for some of the new operations, we need to know it in time to 
add it to 5.14.

Other possibilities include, as mentioned on this forum before, using a 
currently illegal syntax, or expanding 'use re' to allow the user to 
specify they want new syntax.

But the bottom line is that if we go the deprecation route, it should be 
considered soon.

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