| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Todd Blanchard <email@hidden> wrote:
In java if you have someObject.doSomething(argument) the method
doSomething *must* exist. The idea that it might not is simply
inconceivable.
On reflection, "inconceivable" may be too strong a word.
Or perhaps I should say "with reflection", since it is Java's reflective
capability that lets you call methods which may or may not exist on any
given instance.
I can even conceive of a language compiler that implemented this kind of
dynamism using Java reflection and wrote out class-files as the executable
form. Or it might instead perform source-level transformations where
necessary, which were then fed to an ordinary Java-language compiler. Sort
of a higher level of reflection (we could call it Prism). Who knows how
fast it would be, but it's still conceivable.
One of the design principles behind Java is that I don't care much about how long it takes to slap together something that kinda works. The real measure is how long it takes to write something solid.
Another capability DNU allows is the ability to be a proxy for some
chunk of data in a database. Its essentially a query waiting to be
triggered. On first invocation of DNU, the object executes the query
and does a become: queryResults forward: aMessageContext which replaces
itself with the results of the query and reinvokes the original
message. Thus you get object faulting.
You can design Java classes to do this. It's not that difficult, and there
are different approaches with different tradeoffs, though it doesn't use
DNU. It could use reflection, though, if that was the approach that best
fit your tradeoffs.
| References: | |
| >Re: Mac OS X Java Performance (From: Greg Guerin <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.