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

Re: RFC: implementing script runs

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
September 26, 2014 14:23
Subject:
Re: RFC: implementing script runs
Message ID:
20140926142337.GA49677@plasmasturm.org
* Karl Williamson <public@khwilliamson.com> [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.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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