On Friday August 31 2012 9:48:24 AM Johan Vromans wrote: > Darin McBride <dmcbride@cpan.org> writes: > > Disagreed. The shell's case statement ... > > The shell (what 'the' shell??) only works with strings, creating a whole Any shell I've used, mostly bourne-shell derivitives. > different (and much simpler) playground for comparison and matching. True, but my point was that case statements are NOT always just for constants. Saying that it's just for constants is far too specific to certain classes of languages that I don't think applies to Perl. I don't expect that even if we did limit ourselves to constants that we would end up with a highly-optimised branch system the way that C does, so let's not start with a premature optimisation, let's start with what is *useful* given the nature of the rest of the language. Of course, what comprises that is completely debatable, and thus the tiny little thread here. And, yes, it's simpler for the shell. But that, by itself, doesn't mean we can't/shouldn't do more. There are other reasons for that, but I don't think this is one.Thread Previous | Thread Next