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

Re: Implementing script runs

Thread Previous | Thread Next
January 2, 2018 08:35
Re: Implementing script runs
Message ID:
On 25 December 2017 at 20:44, Zefram <> wrote:
> demerphq wrote:
>>Star things are directives or other terms that change how matching works,
>>but  do not match anything themselves.
>>Plus things match stuff.
> I think we'd come to regret using that up for a semantic distinction
> rather than a syntactic one.

Can you please put your objection in plainer terms, possibly with an
example of what you mean?

> We only have three characters that can
> follow open paren to introduce extended stuff, we're already using two
> of them, and we're talking here about assigning the final one.

Maybe my intent was not clear, I dont think (+ should be restricted to
script-runs ALONE.

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.

I havent had a chance to closely look at what Karl did, maybe he is
using (+ for /just/ script runs, which I agree would be a waste.

But we have not used (+ for anything so far, and I would rather we
have a discussion about using it instead of mudding the waters of what
(* means right now before we lose the chance.

Note that one of the reasons that Perl's syntax has been so successful
in the marketplace as opposed to other variants was the clean
distinction of meta and non-meta symbols, so that the rule about what
needed escaping became relatively simple. I see the distinction I am
proposing in the same line.

Stepping back for a second, I would actually say that if we were going
to do this properly we would reach out to the maintainers of the
various PCRE style regex engines, and form some kind of collective
regex syntax design committee, and then decide this collectively.
Arguably people like Karl and I, and the followers of this list have
far too much influence over the long terms design of the regex syntax
given how widely it has spread. I have always felt that we have a
responsibility to the wider community. For instance I communicated
with Philip Hazel of PCRE to get some of the new stuff from 5.10 into
PCRE(, and he actually delivered software implementing it before we
released Perl 5.10!). They  have been making big strides, so I suspect
they should have a voice at this table. Sawyer, i think we should do
something about this.

Anyway, i guess Karl's patch is in so the clock is ticking on us
reverting it, or making a decision about this syntax.

ps: Philip I would encourage you to forward this to any regex
developers you might think pertinent to the discussion.

perl -Mre=debug -e "/just|another|perl|hacker/"

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