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

Re: RFC: New regex modifier flags; also the whimsical nature of backward compatibility; new 'r' flag has issues

Thread Previous | Thread Next
From:
karl williamson
Date:
August 7, 2010 15:38
Subject:
Re: RFC: New regex modifier flags; also the whimsical nature of backward compatibility; new 'r' flag has issues
Message ID:
4C5DE050.4000806@khwilliamson.com
David Golden wrote:
> On Sat, Aug 7, 2010 at 11:31 AM, karl williamson
> <public@khwilliamson.com> wrote:
>> them.  But I note that both he and Jesse had just recently called the idea
>> of using uppercase modifiers "crazy".
> 
> The term "crazy" was in reference to two-letter ones only.
>> So, I guess I'm pushing my proposal still.  What is different, is that I
>> think we now are agreed that the problematic cases are very few, which is
>> why my proposal makes sense at all.  I hope I've persuaded you that there
>> really is only one case that may not be easily resolvable.  And I still
>> think that the appropriate warning is sufficient to handle it.
> 
> I'm going to defer to Jesse to make a decision.  I think it's up to
> him to decide whether the extra parsing complexity is worth it for
> 5.14 or if he's rather have upper case letters to avoid it.
> 
> -- David
> 

By making slight adjustments in what gets done in the common subroutine, 
I'm able to eliminate some current duplicated code around the parsing of 
regex modifiers.  So the parsing complexity might be a wash.  If it's 
not easy to completely resolve the 'le' apparent ambiguity, the extra 
complexity is trivial: looking ahead 1 or 2 characters in a string that 
is already accessible.

It certainly less complex than adding a new pragma, which you guys were 
comfortable with.

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