On Wed, Mar 10, 2004 at 12:42:00PM -0700, Luke Palmer wrote:
: > (Also, these days you have to say <?foo> to collect the results into $0.)
: 
: Hooray!  That was something I had been worried about.
: 
: But C<?> doesn't seem to fit visually.  What's "questionable" about
: that?

It's questionable insofar as it's hypothetical.  It maps to $?foo,
which is the name of the (current value of the) capture within any
interior closure:

    /<?foo> { say "Guessing $?foo for the moment..." <bar> } /

: I can think of a couple that I like better:
: 
:     <^foo>
:     <*foo>
: 
: <^foo> is my favorite at the moment (even though <*foo> is more
: visually pleasing), because it looks like it's transferring the
: information ^up^ in the parse tree.

But $^foo and $*foo mean very different things from hypotheticals.

And in a real sense $?foo is passing guessed information *down*
the match.  The guesses only turn out "right" if you get all the way
to the bottom successfully.  (That's from the point of view that
you recurse deeper to check anything to the right in a regex, even
when syntactically it's shallower.)

Larry

Reply via email to