Re: Java and Objective-C
Re: Java and Objective-C
- Subject: Re: Java and Objective-C
- From: Peter Duniho <email@hidden>
- Date: Sat, 7 Jun 2008 22:48:26 -0700
Date: Sat, 07 Jun 2008 17:16:13 -0700
From: Bill Bumgarner <email@hidden>
On Jun 7, 2008, at 4:16 PM, Peter Duniho wrote:
As I pointed out in my other replies, implementing something like
NSUndoManager is trivial in C#. It would only be slightly more so
in Java, and only because of the above. There's really no need to
rehash the discussion; just look at the previous one, and replace
the C# idioms with their Java equivalents.
I have yet to see an implementation in either language that allows
capture of arbitrary method invocations -- true proxying of method
invocations -- where the set of methods that must be captured are not
declared at compilation time on the mechanism used to capture them.
Maybe you could give a different example then. The NSUndoManager
class has come up twice as a supposed example of where Obj-C shines
while other languages fumble around, but that didn't turn out to be a
valid example of such either time.
So, when you write "true proxying of method invocations", what does
that mean, exactly?
For this purpose, it might help if you specifically construct an
example that doesn't have a semantic equivalent using C# delegates
and anonymous methods, since that is the most obvious scenario I can
think of where you don't know at the time of compilation of the
mechanism used to capture a set of methods what method will actually
be called.
Both Java and C# fully support mechanisms for code that was compiled
earlier to call arbitrary methods compiled later. Heck, for that
matter C/C++ and many other languages offer similar functionality,
albeit not necessarily in quite as graceful a manner as the Java and
especially the C# mechanisms.
Pete
_______________________________________________
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