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

Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicodesemantics for \s, \w

Thread Previous | Thread Next
From:
karl williamson
Date:
May 18, 2010 17:45
Subject:
Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicodesemantics for \s, \w
Message ID:
4BF3349E.3030707@khwilliamson.com
Jan Dubois wrote:
> On Tue, 18 May 2010, Eric Brine wrote:
>> On Tue, May 18, 2010 at 4:04 PM, demerphq <demerphq@gmail.com> wrote:
>>> Basically we only have to worry about 'l' because of 'le', and 'f'
>>> because of 'if'. Any others?
>>>
>> Not "if". it's already a syntax error because "i" is a valid option.
>>
>> Any of the following immediately following the delimiter are currently
>> valid, but will become a syntax error (e.g. /foo/le+1) or different valid
>> code (e.g. /foo/lt+1):
>>
>>    - unless & until from /u
>>    - le & lt from /l
>>    - [none] from /t
>>
>> We're precluded from using these:
>>
>>    - /a (and)
>>    - /f (for, foreach)
>>    - /n (ne)
>>    - /w (when, while)
>>
>> We don't have to worry about these:
>>
>>    - cmp
>>    - eq
>>    - if
>>    - ge & gt
>>    - or
>>    - xor
>>    - builtin function
>>    - sub names
>>    - barewords
> 
> Yes, but why bother?  What is wrong with your previous suggestion to only allow
> the new modifiers after a
> 
>     use 5.014;
> 
> That lets us pick the letters based on mnemonic value instead of having to
> work around some obscure edge cases.  And the code using the new letters
> will not work on earlier Perl versions anyways, so having the "use 5.014"
> in there is a good idea anyways.
> 
> This will also allow to us to turn any currently unused modifiers into syntax
> errors right away for all 5.14+ code as well without breaking any compatibility.
> 
> What's not to like?
> 
> Cheers,
> -Jan
> 
+1

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