• 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: ^Block statement considered harmful for callbacks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ^Block statement considered harmful for callbacks?


  • Subject: Re: ^Block statement considered harmful for callbacks?
  • From: Tom Davie <email@hidden>
  • Date: Thu, 25 Apr 2013 20:57:27 +0100

On 25 Apr 2013, at 20:48, Oleg Krupnov <email@hidden> wrote:

>
>
> Yes, this is jumping through hoops, and even then you are not entirely safe. How about referencing ivars from blocks? How about referencing other objects that may in their turn reference self etc.? You have to keep it all in mind and constantly fight with the side-effects by adding more crappy hoops to your code. And it is a problem that does not even exist with delegates.

On the other hand, delegates add the problem that they desiccate the code for dealing with the results from the code for setting up the request in the first place.  I would consider that a much much much higher penalty than having to a bit careful about retain cycles.

Thanks

Tom Davie
_______________________________________________

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: ^Block statement considered harmful for callbacks?
      • From: Oleg Krupnov <email@hidden>
References: 
 >^Block statement considered harmful for callbacks? (From: Oleg Krupnov <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Tom Davie <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Oleg Krupnov <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Tom Davie <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Diederik Meijer | Ten Horses <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Tom Davie <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Oleg Krupnov <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Lee Ann Rucker <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Jens Alfke <email@hidden>)
 >Re: ^Block statement considered harmful for callbacks? (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: Re: ^Block statement considered harmful for callbacks?
  • Next by Date: Re: ^Block statement considered harmful for callbacks?
  • Previous by thread: Re: ^Block statement considered harmful for callbacks?
  • Next by thread: Re: ^Block statement considered harmful for callbacks?
  • Index(es):
    • Date
    • Thread