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

Re: RFC: implementing script runs

Thread Previous | Thread Next
Aristotle Pagaltzis
September 26, 2014 14:23
Re: RFC: implementing script runs
Message ID:
* Karl Williamson <> [2014-09-25 07:20]:
> The idea I had is to have an extra '*' following the quantifier mean
> to use a script run. For example, qr/\w+*/ would match all the
> consecutive word characters that are in the same script as the first
> one found.

Yuck. Why a quantifier modifier? Feels to me like those are for things
that affect the mechanics of the quantification (such as greedy or
possessive), not the characteristics of the data. And since there is
just one modifier available, it also seems frivolous to expend that one
on such an arbitrarily different choice of meaning.

Why not a pattern flag? That makes it easy to alter multiple quantifiers
without linenoising up each one of them, and on top of that you gain the
option of doing `use re '/X';` to make this the default within a scope,
which both seem likely to be desirable features for many use cases that
suggest themselves for this thing. And naturally you also can use (?X:)
to specify it for only part of a pattern, if needed.

Aristotle Pagaltzis // <>

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