> > The only extra piece of syntactic sugar that C<rx> is giving us over > > C<rule>[*] is the ability to have arbitrary delimiters. > Not quite arbitrary. Alphanumerics aren't allowed, nor are colon or > parens. Of course. I didn't want to poison my entire sentence with footnotes for the obvious exceptions. > > If I were satisfied with always using C<{}> as delimiters for C<rx> then a > > program would run the same if I did a C<s:each/rx/rule/> on it. > Yes. Although, of course, you'd have to do a C<s:each{rx}{rule}> if you wanted > to be consistent ;-) Ha ha, yes. > > Or, to put it more succinctly: do there exist two pieces of > > *syntactically correct* code like > > ... rule ... > > and > > ... rx ... > > (where the ... are identical in both) which each produce *valid* and > > *different* semantics? > Yes. For example: > sub foo; > foo rule ($arg) { $var := <$arg> }; > foo rx ($arg) { $var := <$arg> }; [munch]
Ouch. [Looks to others on list] Hands up those of you who were just about to suggest that example, but wanted Damian to move first? :) Well, there goes my beautiful table from another post. Darn. :/ (And just as I was beginning to try to draw parallels between sub foo is xyz { ... } and rule foo :xyz { ... } but that's just getting plain strange.) > > Notwithstanding C<< -> >>, which I now understand to be nothing > > more than a different spelling of C<sub>. > It's a little more than that. A C<< -> >> uses different delimiters > (now *there's* a parallel!) for its parameter list. Whereas C<sub> > requires {...}, C<< -> >> allows either (...) or <ws>...<ws>. ^ ^ Hang on, are we still talking parameter lists, or the closure itself? (Or was that just a typo, instead supposed to be parentheses?) -- Debbie Pickett http://www.csse.monash.edu.au/~debbiep [EMAIL PROTECTED] "On the docks her soul is sinking, but her spirit longs to soar. Oh life, she cries, there must be more." - _Oh Life (There Must be More)_, Alan Parsons