develooper Front page | perl.perl5.porters | Postings from September 2014

Re: RFC: implementing script runs

Thread Previous | Thread Next
September 29, 2014 13:09
Re: RFC: implementing script runs
Message ID:
On Mon, Sep 29, 2014 at 08:41:30AM -0400, Ricardo Signes wrote:
> * Abigail <> [2014-09-29T04:59:16]
> > In a recent, private communication with Yves, I remarked that we only
> > have 11 \X's (where X is any ASCII letter) unassigned and hence, we should
> > be very carefully when assigning meaning to the ones left, and don't use
> > it for a feature that won't be used a lot.
> > 
> > Or not use for something where alternative syntax is available. Since it's
> > about matching characters with certain properties, instead of \i or \j,
> > one could also use \p? For instance, \w\p{:PREVIOUS_SCRIPT}* .
> I wonder if, rather than affecting the previous atom, it wouldn't be more
> useful to set a scope for single-script matching.
>   (?«onescript»:\w+\d+\.\d+)
> I really haven't given this deep thought.  It just popped into my head and I'm
> heading out, so I'm getting it written down before I forget to think about it
> more.

I think that's a better syntax that either the proposed quantifier
modifier, or the escape sequences, as you can enforce longer (sub)patterns
to be in one script than just a run.

It's on par with the modifier proposal when it comes to usefulness, except
that your proposal doesn't use a single letter modifier (another thing we
won't have an endless supply off either), but uses a full word.

The non-ASCII characters, I just consider them to be typos ;-)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About