develooper Front page | perl.perl5.porters | Postings from January 2018

Re: Implementing script runs

Thread Previous | Thread Next
From:
Karl Williamson
Date:
January 2, 2018 16:24
Subject:
Re: Implementing script runs
Message ID:
325e8686-3d3e-7745-9995-fa200d81cf89@khwilliamson.com
On 01/02/2018 07:21 AM, Zefram wrote:
> demerphq wrote:
>> Can you please put your objection in plainer terms,
> 
> I don't know how to make it plainer than it already is.
> 
> The issue is that syntactically "(*" is used for extensions that are
> identified by alphanumeric identifier, whereas "(?" is used for extensions
> that are identified by further punctuation.  The proposed use of "(+"
> would mean that it duplicates the "(*" format, identifying extensions by
> alphanumeric identifier.  This duplication is wasteful; I think we should
> reserve "(+" for something that actually requires a distinct syntax.
> 
>> Maybe my intent was not clear, I dont think (+ should be restricted to
>> script-runs ALONE.
> 
> That's not the issue.  "(+" is clearly not intended to be used for
> script runs alone, but for an open-ended set of extensions.  However,
> your proposal does involve restricting "(*" to a relatively limited set
> of uses.
> 
>> But I do think restricting to (* to things that dont match, and/or
>> change behavior of matching (which is true so far) and leaving (+ to
>> new things that do match, is a pretty reasonable distinction.
> 
> If you want some syntactic cue to that distinction, better to make it
> through capitalisation of the identifiers, a difference that we actually
> already have.
> 
> -zefram
> 

I don't understand why things like PRUNE have to be in all caps.  From 
what yves said, it somehow involved conflicts with other regex engines 
syntax?

FWIW, there is another syntax available for us for extensions, though 
quite limited.  Literal '{' is officially deprecated without a backslash 
so ({...}) could be used.  Unfortunately no warning is currently 
generated for that occurrence, and valid quantifier syntax compiles into 
matching literally.

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