Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Perl 5.10: switch statement demo

by talexb (Canon)
on Dec 20, 2007 at 15:29 UTC ( #658131=note: print w/replies, xml ) Need Help??

in reply to Re: Perl 5.10: switch statement demo
in thread Perl 5.10: switch statement demo

    Judging by how often people forget to place break;, it's much more natural for us to think of cases as exclusive.

I dunno -- remembering to add the break; is just one of the things that I know and will never forget when I write C. You can call it a feature or a bug, but it's part of the language that I know.

I didn't write the node to complain, really, it's more of a warning for anyone else who grew up writing C. And it's spawned a couple of really good responses detailing alternative approaches that work, both before and after 5.10. And that discussion, by itself, is very useful.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://658131]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2016-10-27 09:17 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (357 votes). Check out past polls.