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 17:15:21 -0700
Date: Sat, 07 Jun 2008 14:43:26 -0700
From: Bill Bumgarner <email@hidden>
Subject: Re: Java and Objective-C
[...]
More subtly, consider what would happen if an accessor method were
inlined by the JIT or compiler. Such an action would effectively
make it impossible to do KVO against said accessor unless the inlining
optimization could be undone.
.NET has both an inlining compiler and bindable properties. I admit,
I haven't looked into exactly how that works. Possibly only getters
are inlined, or possibly the intermediate-language ("IL") itself has
support for observing property changes even when a setter has been
inlined.
Regardless, the implication made by both you and Ken that allowing
inlining and KVO at the same time requires an architecture like that
of Objective-C's is false. There's at least one present counter-
example, and that's sufficient to disprove the implication.
The specific example you gave is even more easily addressed: inlining
compilers don't inline virtual methods. If the method/function can
be overridden somehow, it can't be inlined. In Java, everything's
virtual by default, which does in fact restrict the compiler
somewhat. But it doesn't lead to bugs, nor does it interfere with
functionality.
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