Larry wrote:

> But the language in the following lexical scope is a constant, so what can
> :syntax($foo) possibly mean?  [Wait, this is Damian I'm talking to.]
> Nevermind, don't answer that...

Too late! ;-)

Regex syntaxes already are a twisty maze of variations, mostly alike. I
can easily envisage Perl users occasionally needing/wanting/using
patterns which are any of:

    :syntax<POSIX>
    :syntax<grep>
    :syntax<egrep>
    :syntax<vim>
    :syntax<Snobol>
    :syntax<Google>

Not just because people are used to different syntaxes, but also because
programs will want to accept search patterns in different (generally: more
restrictive) syntaxes so as to be able to interpolate them safely:

    use Regex::Google;

    for =<> :prompt<Find:> -> $search {
        for @texts {
            say if m:syntax<Google>/$search/;
        }
    }


> And there aren't that many regexish languages anyway.

That depends on how broadly you define regexish. Search is a *very* common
activity and people are (re-)inventing notations for it all the time.

Damian

Reply via email to