develooper Front page | perl.perl5.porters | Postings from July 2016

Re: RFC: seeking syntax for allowing script run pattern matching

Thread Previous | Thread Next
From:
Maxwell Carey
Date:
July 7, 2016 16:12
Subject:
Re: RFC: seeking syntax for allowing script run pattern matching
Message ID:
CADLEpY5r_y=uRr4aU6_u=7tMqLSxS-9kKHXRvgtoC=Y2JU86qw@mail.gmail.com
On Wed, Jul 6, 2016 at 4:58 PM, <hv@crypt.org> wrote:

> I had assumed the proposal was explicitly to affect \w. If that's not
> the case, I don't understand what it would affect.
>

Why only \w? Punctuation characters can be mimicked in other scripts, too.
U+FF70 (ー) HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK looks an awful
lot like a dash.


>
> I had assumed /(*sr: \w+ x \w+ )/x would require two words sharing a
> common script separated by a literal x. Are you expecting rather that
> it would require the literal x also to be part of the common script?
>
>
That seems very counter-intuitive. Everything is inside the same grouping
construct; why would some parts be treated differently?


> It feels unreasonably limiting (or at least unreasonably ugly) if that
> would have to be expressed instead as /(*sr: \w+ (*srhide:x) \w+ )/x.
>
>
Maybe it's ugly, but it's also clear exactly what is going on.

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