On Fri, Sep 07, 2007, Larry Wall writes: > If we stick with +, one approach might be to simply disallow whitespace > in composite character classes.
Of the choices presented thus far, I like this one the best. Although I did like being able to stick whitespace in the character classes for readability, such that losing the whitespace in <+foo - [Jj] > would be a disappointment -- I still like <+foo> as much as the other alternatives. Even if we decide that <+foo> isn't the official non-capturing syntax, we still have the case that <+foo> is effectively a non-capturing form of <foo>. I sorta liked that we were reducing two syntaxes for the same thing ( <?foo> and <+foo> ) down to one, so adding one back in feels funny. I do agree that we may be getting a few too many +'s in our patterns. However, having just converted several grammars in Parrot languages to use the new <+foo> syntax, I was surprised at how few there actually were. And many of the existing cases where I had previously used <?...> didn't really change (or need to change), because they were already zero-width things such as <?null>, <?before>, <?panic: ...>, etc., and I felt it made more sense to keep the <?...> syntax anyway. Of the non-<+foo> options given thus far, I like <~foo> and <.foo> (in that order). I don't find ~ all that hard to type -- after all, we use the tilde quite frequently in things like Unix's "~username" syntax, in Perl 5's =~ operator, and even in Perl 6 with the ~~ smart match operator. Perhaps I would feel differently about tilde if I were on a non-US keyboard. I agree that <:foo> should probably be reserved for something having to do with pairs or adverbs. I'm not at all a fan of <\ws>. Anyway, those are my reactions, for whatever they're worth. Pm