• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Since Apple Listens to this List... [Case Statements]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Since Apple Listens to this List... [Case Statements]
      • From: Jim Schram <email@hidden>
References: 
 >Re: Since Apple Listens to this List... [Case Statements] (From: Brennan <email@hidden>)

  • Prev by Date: Re: Script works in OS 9 but not in OS X please help
  • Next by Date: Cumulus & Web Publisher on OS X
  • Previous by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Next by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Index(es):
    • Date
    • Thread