On Mon, 2008-04-28 at 09:01 -0400, Colin Walters wrote:
2008/4/27 Callum Lerwick <seg(a)haxxed.com>:
>
> IMHO the only reason Java bytecode exists is to make it possible to
> distribute "run anywhere" proprietary software while keeping the source
> code closed.
No. Even originally, that isn't true.
You don't honestly believe that, do you?
Having separate source and
binary formats gives you a lot of flexibility; for example you can
compile source code that uses new features into an older bytecode in a
compatibility mode.
... Which is completely moot if you're not distributing bytecode in the
first place.
If you think the reason it's still around is just obfuscation,
try
using a modern decompiler.
Decompilers don't bring back comments or documentation. And commercial
joints protective of their source inevitably use a post-processor to
obfuscate class and method names (and possibly even more evil things) as
well:
http://www.google.com/search?q=java+bytecode+obfuscator
Technically, you can de-compile native binaries too. They're
reverse-engineered all the time.
> Thus in an open source environment, Java bytecode has
> little reason to exist. If we're going to *distribute* compiled code, it
> may as well be nice fast native code.
1) Hotspot does a fine job of creating native code.
Unless it's somehow faster than AOT-compiled native code, that's a
non-argument.
2) There are a *ton* of languages other than Java that run on top of
the JVM that compile to bytecode. JRuby, to name one.
Which are all as equally pointless as Java itself. My argument applies
to them as well.
3) It's simply not worth trying to go against the grain of the
entire
Java community here.
You're absolutely right. The FLOSS community standing up for itself and
going against the grain of closed source software? What the hell was I
thinking...
I rescind my argument.