Hi all, While working on a parser, I've repeatedly encountered patterns like:
if c == ' ' || c == '\t' { /* handle whitespace */ } if token == EOL || token == EOF { /* handle end markers */ } if lexer.Type == TextLine || lexer.Type == WhitespaceLine { /* handle lines */ } Go already allows multiple values in case statements: switch c { case ' ', '\t': /* handle whitespace */ } I'm wondering if there could be a more elegant way to express this pattern in Go, perhaps something conceptually similar to: if c [some_syntax] ' ', '\t' { /* handle whitespace */ } Do you think that the Go team would be likely to consider such a proposal, or would taking the time to prepare and submit a proposal likely just be for naught? If this seems worthy of a proposal, what syntax do you think might be the best fit for the Go language? Thanks, -Mike -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/F06145BC-B54C-4C3C-A04A-E9E6839E8169%40newclarity.net.