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

Re: RFC: implementing script runs

Thread Previous | Thread Next
From:
Abigail
Date:
September 29, 2014 13:09
Subject:
Re: RFC: implementing script runs
Message ID:
20140929130856.GA24558@almanda.fritz.box
On Mon, Sep 29, 2014 at 08:41:30AM -0400, Ricardo Signes wrote:
> * Abigail <abigail@abigail.be> [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 ;-)



Abigail

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