I'm thinking of adding regex literals to GNU Smalltalk. The only syntax I found that would work is ##/regex/. /regex/ wouldn't work for the old syntax, because the lexer has no way to understand that the / in this example

    a: b
        /regex/ printNl

starts a regex and is not a division operator. It would work in the new syntax (after one of [ ( { ^ . keyword: identifier binary-message, and maybe a few more I forgot, / would start a regex, otherwise it would be a division operator), but I don't like to add a feature that cannot be ported to other Smalltalks.

What do you think? Right now I'm more for "no" or "not yet", but I'm open to discussion.

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to