I've thought about it, and I believe that if were are going to require
that the function be named every time, that is, via:

    m/..../

that you should then just dispense with the slashes and make it a 
proper function call:

    m(....)

But then you'll find that "m" is a lame name for a function, having
but one letter as it does.  "match" or "pattern_match" or "re_match"
or somesuch would be better.

You could "kinda" make it look like a "real" function, as has occasionally
been suggested:

    match(STRING, PATTERN, FLAGS)

But before that gets too much support, that has several problems.
First, unless you have rather clever new context coercion prototypes
of type regex (which would let us define split(), too, though), you
won't properly pass things like "\b" and friends through when you
should.  A regex only kinda acts like a doubly quoted string; it
isn't, really, in terms of backslash escapes.  Second, positional
parameters are not conducive to omissions beyond tail-end ones.
Thus, you couldn't easily have all of

    1 match(STRING, PATTERN, FLAGS)
    2 match(STRING, PATTERN)
    3 match(PATTERN, FLAGS)
    4 match(PATTERN)

because you can't really tell 2 from 3.

--tom

Reply via email to