On Fri, Sep 22, 2006 at 10:22:52PM +0800, Audrey Tang wrote:
> Moreover:
> 
>    /<foo> bar bar <foo>+/
> 
> should set $<foo> to an Array with two Match elements, the first being a
> simple match, and the second has multiple positional submatches.
> 
> The thinking behind the separate treatment is that in a contiguous  
> quantified
> match, it does make sense to ask the .from and .to for the entire  
> range, which
> is very hard to do if it's an Array (which can have 0 elements,  
> rendering $<foo>[-1].to
> dangerous).  


Out of curiosity, why not:

    /<foo> bar bar $<xyz>:=(<foo>+)/

and then one can easily look at $<xyz>.from and $<xyz>.to, as well
as get to the arrayed elements?  (There are other possibilities as
well.)

I'm not arguing in favor of or against the proposal, just pointing
out that there are ways in the existing scheme to get at what is
wanted.

Pm

Reply via email to