I used the word "need" as in "require to function", as opposed to "have a use for". I'm not about to argue that the JVM couldn't support them better with more information. Even if I couldn't think of a reason, I would still bet on more information allowing for better support.
Perhaps what you're really trying to get at is that the JVM (not the language) doesn't really support inner classes well. You could even take your original statement, and qualify it with "... in the JVM" rather than tying it to javac. Or you could argue that they're tacked on as an afterthought. That would cover the 'final variable' issue as well. On Oct 26, 11:43 am, DanH <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

