• 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: Unnecessary Boolean Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unnecessary Boolean Warning


  • Subject: Re: Unnecessary Boolean Warning
  • From: Graham Cox <email@hidden>
  • Date: Thu, 04 Aug 2011 11:51:08 +1000

On 04/08/2011, at 11:36 AM, glenn andreas wrote:

> More likely the somebody that interviewed you didn't have it correct in the first place, scarring you for life...


Well, that part's true :)

I seem to recall I failed that question, the only one I did. So I got the lecture and never questioned it. I did get that job anyway, though in hindsight I'd rather I hadn't, but that's another story...

I think the point they wanted to get across was that they didn't want to see code like this:

if( someFunction() && someOtherFunction()){ ... }

instead of:

if( someFunction())
{
    if( someOtherFunction())
    {
        ....
    }
}


where (they claimed) in the first case someOtherFunction() may or may not run depending on compiler implementation, and not dependent on the result of someFunction().


On the other hand, this was easily 15 years ago, maybe I've just forgotten the question and what it was all about. It happens - I forget so much stuff these days.

--G._______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unnecessary Boolean Warning
      • From: Andy Lee <email@hidden>
References: 
 >Unnecessary Boolean Warning (From: Dale Miller <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Charles Srstka <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Dale Miller <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Scott Ribe <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Thomas Davie <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Scott Ribe <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Thomas Davie <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Graham Cox <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Greg Parker <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Graham Cox <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: Unnecessary Boolean Warning
  • Next by Date: Re: Drawing text like Lion's Mail
  • Previous by thread: Re: Unnecessary Boolean Warning
  • Next by thread: Re: Unnecessary Boolean Warning
  • Index(es):
    • Date
    • Thread