• 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: Andy Lee <email@hidden>
  • Date: Wed, 03 Aug 2011 22:10:17 -0400

On Aug 3, 2011, at 9:51 PM, Graham Cox wrote:
> 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())
>    {
>        ....
>    }
> }


This I agree with. I "know"[1] about the short-circuiting behavior of && and still I'd prefer the conditional flow be super-clear rather than have to think about operator rules even a tiny bit. But now we're back where we started.

--Andy

[1] Bearing in mind that what we "know" sometimes isn't so. :)

_______________________________________________

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: Preston Sumner <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>)
 >Re: Unnecessary Boolean Warning (From: Graham Cox <email@hidden>)

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