[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PROPOSAL: Objective-C++
From: |
Helge Hess |
Subject: |
Re: PROPOSAL: Objective-C++ |
Date: |
Tue, 20 Nov 2001 09:59:10 +0100 |
David Relson wrote:
> >I personally like
> >
> >[array makeObjectPerformSelector:@selector(doSomething)];
>
> Eric,
>
> Yep. That's another way to skin the same cat. However,
> makeObjectPerformSelector: requires defining an additional method.
Well, HOM removes that requirement. It's just
[[array do] doSomething];
...
The implementation concept is pretty easy, the object returned by "do"
catches the "doSomething" invocation and executes it on the source
object.
The major problem I have with this approach is, that it requires a
working NSInvocation, which is difficult to have on all platforms ...
> Using
> blocks does it inline, which I consider a bit easier. Also, blocks can
> have two arguments. For example to sort an array one could use:
>
> array = [ array orderedBy: [ :a :b | [ a lt: b ]]];
You can also have as much parameters as you like in HOM.
Greetings
Helge
--
SKYRIX Software AG - http://www.skyrix.com
Web Application Technology for Enterprises
- Re: PROPOSAL: Objective-C++, (continued)
- Re: PROPOSAL: Objective-C++, Ovidiu Predescu, 2001/11/19
- Re: PROPOSAL: Objective-C++, Kim Shrier, 2001/11/19
- Re: PROPOSAL: Objective-C++, Ziemowit Laski, 2001/11/19
- Re: PROPOSAL: Objective-C++, Kim Shrier, 2001/11/19
- Re: PROPOSAL: Objective-C++, Philippe C.D. Robert, 2001/11/19
- Re: PROPOSAL: Objective-C++, Björn Gohla, 2001/11/19
- Re: PROPOSAL: Objective-C++, Nicola Pero, 2001/11/19
- Re: PROPOSAL: Objective-C++, David Relson, 2001/11/19
- Re: PROPOSAL: Objective-C++, Erik M. Buck, 2001/11/19
- Re: PROPOSAL: Objective-C++, David Relson, 2001/11/19
- Re: PROPOSAL: Objective-C++,
Helge Hess <=
- NSInvocations (was Re: PROPOSAL: Objective-C++), Stephen Brandon, 2001/11/20
- Re: NSInvocations (was Re: PROPOSAL: Objective-C++), Helge Hess, 2001/11/20
- Re: PROPOSAL: Objective-C++, Stephen Peters, 2001/11/19
- Re: PROPOSAL: Objective-C++, Helge Hess, 2001/11/20
- Re: PROPOSAL: Objective-C++, Stefan Böhringer, 2001/11/20
- Re: PROPOSAL: Objective-C++, Ovidiu Predescu, 2001/11/19
- Re: PROPOSAL: Objective-C++, Björn Gohla, 2001/11/19
- ObjC additions (Was: Re: PROPOSAL: Objective-C++), Stefan Urbanek, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Ovidiu Predescu, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Ziemowit Laski, 2001/11/19