Re: Since Apple Listens to this List... [Case Statements]
Re: Since Apple Listens to this List... [Case Statements]
- Subject: Re: Since Apple Listens to this List... [Case Statements]
- From: Emmanuel <email@hidden>
- Date: Tue, 12 Feb 2002 19:51:02 +0100
At 1:11 AM +0100 12/2/02, Brennan wrote:
>
I believe 'else if' makes it easy to introduce inconsistencies (bugs) if
>
you're >not paying attention, and as programmers, our most valuable
>
resource is our >attention span.
Note that "if ... else if ..." is not really equivalent to "case ...",
because (at least with C++) execution won't stop on the next "case". You've
got to write "break".
In my experience of C++, the "case" structure generates more errors than
"else if", because of that naughty "break" that you always eventually
forget to write.
In fact, if I could, I would suppress the "case" from C++. I owe "case" at
least 10 or 20 bugs that would have been avoided with good ol' "if ...
else".
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.