[MUD-Dev] Why not compile java into object code?
Ben Greear
greear at cyberhighway.net
Fri Feb 27 17:37:39 CET 1998
On Thu, 26 Feb 1998, Caliban Tiresias Darklock wrote:
> On 08:18 PM 2/26/98 +0000, I personally witnessed Ben Greear jumping up to
> say:
> >
> >Since this is one of the largest bodies of opinionated, hard core coders I
> >know of, I'll pose the question here. It's mostly off topic of course.
> >
> >What would it take to compile java down into object code (.o files)?
>
> A complete perversion of everything Java stands for. The whole idea is
> 'write once, run everywhere'. If you want object code, use C++.
>
Don't get me wrong here, I love the concept of java. But it's slowness
makes me leery of writing a really huge, compilcated application in it.
It seems that if you could make it fast for most of the people, but
workable for all, that would be better than just workable for all...
I probably will use c++ for the server and other non GUI stuff, but I
know and love the Java awt, and would be loathe to learn a c/c++
interface, which would not be portable across Xwin and win95....
> >It's not being done...but I wonder why? I don't care if I have to compile
> >for each platform...if I compile just for win95 80% of my users will enjoy
> >a tremendous speedup....
>
> Use Microsoft J++. It generates much faster bytecode, which is
> unfortunately not always compatible with JVMs from other vendors, but who
> cares? Everyone's using Microsoft anyway, right? What difference does it
> make if some of the people who would normally be able to run it can't?
> Well, to hear Sun's side of it, the entire POINT of Java is compatibility
> and if you design an incompatible Java compiler then you're not really
> doing Java. I tend to agree.
Never tried it.... Might be worth it to put it out as well as the
standard java compiled classes though, if it really did increase
performance noticeably...
> Java is a language built for a specific purpose. You wouldn't write an
> operating system in BASIC. You wouldn't write a device driver in APL. Could
> you? Probably. But they're the wrong tools for the job. If you go out and
> buy a screwdriver, you can't expect it to hammer nails, and wishing someone
> would make a screwdriver with a stainless steel handle is a lot less
> productive than going out and buying a hammer. If you want native code,
> quit working in Java and pick up a real language. You'll lose a lot of
> Java's nice features, but you'll lose all the restrictions, too. The
> question is what's more important -- the nice features of Java, or the nice
> features of C++? Sooner or later you have to decide whether you're going to
> buy the station wagon or the convertible, and live with whatever choice you
> make.
I want a convertable that will haul a trailer :)
>
> >On a similar level, is this what JIT compilers do?
>
> Nope. JIT compilers take actual Java source and make it into bytecode. In
> other words, you don't have to compile your Java if you use a JIT compiler,
> because the JIT compiler does it for you. Excellent during development. Not
> so excellent in distribution.
I think you're wrong on this one...
Ben Greear (greear at cyberhighway.net) http://www.primenet.com/~greear
Author of ScryMUD: mud.primenet.com 4444
http://www.primenet.com/~greear/ScryMUD/scry.html
More information about the mud-dev-archive
mailing list