On Mon, 12 Mar 2012 17:47:34 +0100, Kevin Wright
<[email protected]> wrote:
Primitives are good... if you're a CPU. I have absolutely no objection
to
the performance benefits of primitives in bytecode (in the earlier
pre-JIT
interpreters at least, the benefit is less clear in a post-JIT world).
But what's in bytecode for the benefit of the compiler needn't be what's
in
the language for the benefit of programmers. A translation in javac
would
allow Java to have pure objects whilst maintaining primitives in
bytecode;
just as javac allows us to create inner classes, even though the
underlying
platform has no idea of the concept. We *can* have our cake and eat it
too.
As for why it's right for everything to be objects? It's a far cleaner,
more elegant, and a more internally consistent model for programmers to
reason about. The very existence of this thread illustrates why that's
important!
To quote: "premature optimisation is the root of all evil", and you can't
get much more premature than in the design of a language...
I won't object to anything you wrote - I'm just pointing out that in 1995
betting that the compiler could do all the involved magic, and in an
efficient way, was probably a hazardous bet.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
[email protected]
http://tidalwave.it - http://fabriziogiudici.it
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" 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/javaposse?hl=en.