• 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: Cocoa and messages to nil, revisited
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa and messages to nil, revisited


  • Subject: Re: Cocoa and messages to nil, revisited
  • From: Daniel Jalkut <email@hidden>
  • Date: Wed, 8 Aug 2007 01:47:17 -0400


On Aug 7, 2007, at 7:35 PM, Jeff Laing wrote:
As a performance junkie, its disappointing that people still think that its
quicker to just send the message to nil, than to do "if (target) [target
message];" since it doesn't matter *how* fast you make that message
dispatcher, it can't possibly be faster than the two instructions that the
conditional takes

Doesn't matter. Sending messages to nil is easier to read and well established as generally safe in Cocoa. The areas where it is unsafe are well documented. I enjoy sending messages to nil. Obviously so does much of Apple, and I'm sure much of the rest of the Cocoa developer world.


Performance on the level you describe is generally not worth considering. (It's not worth it for the "people" who use nil messaging as a pro-performance argument, either!)

Daniel
_______________________________________________

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: 
 >Cocoa and messages to nil, revisited (From: Jeff Laing <email@hidden>)

  • Prev by Date: NSScroller icon / split view
  • Next by Date: Issue with running a process as root
  • Previous by thread: Cocoa and messages to nil, revisited
  • Next by thread: Re: Cocoa and messages to nil, revisited
  • Index(es):
    • Date
    • Thread