• 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: assignment in if clause
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assignment in if clause


  • Subject: Re: assignment in if clause
  • From: "Hamish Allan" <email@hidden>
  • Date: Mon, 26 May 2008 20:38:11 +0100

On Mon, May 26, 2008 at 8:12 PM, Michael Gardner <email@hidden> wrote:

> I disagree with the whole notion that using the result of an assignment
> is "bad style" or "confusing". I find it quite clear and natural to use
> constructs like "while (foo = [enumerator nextObject])", and I suggest
> to those who are uncomfortable with the similarity of the = and ==
> operators to use an editor that makes the difference clear, perhaps via
> syntax coloring. And adding extra parentheses just to assure the
> compiler that you know what you're doing is man serving machine, not the
> other way around as it should be.

Why tinker with syntax highlighting to make the difference a bit
clearer, when the compiler you're already using already makes the
difference crystal clear?

Presumably, using debugging tools is also a case of man serving
machine -- you should just write the code properly in the first place
;)

Hamish
_______________________________________________

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

References: 
 >alternate pattern for object initializers (From: Stuart Malin <email@hidden>)
 >Re: alternate pattern for object initializers (From: "Kyle Sluder" <email@hidden>)
 >Re: alternate pattern for object initializers (From: Stuart Malin <email@hidden>)
 >Re: alternate pattern for object initializers (From: Jens Alfke <email@hidden>)
 >assignment in if clause (was: alternate pattern for object initializers) (From: Stuart Malin <email@hidden>)
 >Re: assignment in if clause (was: alternate pattern for object initializers) (From: Jonathan Prescott <email@hidden>)
 >Re: assignment in if clause (From: Michael Gardner <email@hidden>)

  • Prev by Date: Re: assignment in if clause
  • Next by Date: RE: NSTableView
  • Previous by thread: Re: assignment in if clause
  • Next by thread: Re: alternate pattern for object initializers
  • Index(es):
    • Date
    • Thread