Re: Unnecessary Boolean Warning
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