Hi Richard,

I wouldn't call s/// a routine. It's actually (implemented as) a kind of
quote, like Q, q, qq, qw, and also rx, and tr. I consider that an
important distinction, because the syntax with which you call s/// is
very different from how you call a sub. You can't just `say '(' ~ ')'
1234`, because regular perl6 syntax doesn't allow two terms in a row (in
this case the string ")" and the number 1234).

I'd say it more like "subroutines have precedence over some special
syntax", and "s/ b /x" will be parsed like "s() / b() / x()", but b and
x aren't defined, so it errors out at the end of compilation.

I hope that makes things a bit clearer
  - Timo

Reply via email to