The JVM certainly could make use of the knowledge.  As it is, there
are some significant security holes, and the JVM must have some
"special" rules (loopholes) so that inner classes will work.  And the
scheme used is slower and much more cumbersome than would be an
implementation where the JVM is in on the secret and could implement
the access checking and outer class access directly.

On Oct 23, 2:57 pm, Bob Kerns <r...@acm.org> wrote:
> That's because the JVM doesn't NEED any other knowledge. The JVM
> doesn't define the language -- the compiler does.
>
> The JVM is the environment the compiler targets, but with a different
> compiler, you get, say, Scheme or AspectJ instead of Java.
>
> Taking your argument to the logical conclusion, nothing about C++ is
> real, because the hardware doesn't know about it. Hmmm....
>
> Solipsism is fun, but not particularly useful.
>
> On Oct 23, 5:53 am, DanH <danhi...@ieee.org> wrote:
>
> > > Inner classes certainly exist
>
> > Only as a fiction of javac.  The JVM has no knowledge of them, other
> > than the InnerClasses attribute that's really just for debugging and
> > reflections.
>
> > On Oct 22, 11:17 pm, Bob Kerns <r...@acm.org> wrote:
>
> > > There's always been Runnable, yes, but there hasn't always been the
> > > cultural emphasis on composition rather than derivation. In other
> > > words, I agree it was a mistake, but it was a mistake born of its
> > > time, and not one that would be as likely to be repeated today.
>
> > > Inner classes certainly exist -- they're just broken (only capture
> > > final variables). The sense of unreality to which you refer is just an
> > > implementation technique, and only visible if you peek below the
> > > covers of reality. :) That's true of most any bit of programming
> > > semantics you choose to examine that closely.
>
> > > On Oct 22, 5:15 pm, DanH <danhi...@ieee.org> wrote:
>
> > > > But there's always been a Runnable, and it's no more difficult to
> > > > subclass a Runnable than a Thread.  Inner classes made it easier (if
> > > > more obscure) to define your subclasses, but didn't change the basic
> > > > nature of the beast.  (In fact, in reality inner classes don't exist.)
>
> > > > On Oct 22, 7:04 pm, Bob Kerns <r...@acm.org> wrote:

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to