Re: Blocks in Obj-C (was: Passing Obj-C method as callback to C function)
Re: Blocks in Obj-C (was: Passing Obj-C method as callback to C function)
- Subject: Re: Blocks in Obj-C (was: Passing Obj-C method as callback to C function)
- From: Marco Scheurer <email@hidden>
- Date: Wed, 29 Oct 2003 19:13:54 +0100
Things like [array do:...] can actually be done differently, using
concepts like Higher-Order Messaging.
Yes, I'm familiar with Marcel's library. And its really brilliant
considering the constraints he was working under. But in the above
example, it wouldn't help because HOM can only arrange to send a
message to each object and doesn't help if there's no method that does
what you want. You could stick one on using a category but now you've
written much more code than just doing it with C loops.
Yes, but it has other advantages:
- the method has a name which should explain what the previously
unnamed code fragment does (aka intention revealing selector).
- the method can be reused.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.