Re: Why not written in Java?



Raghar,

I think that a lot of your points are well taken, but
they're about ease of programming, not program
efficiency.

For most of what most programmers do, ease of
programming is more important than efficiency. But
it's not true of all programs. I have worked on numerous
projects where efficiency and/or control is critical.

For example, I've been on publishing projects where
a program must parse and process a million or more
XML documents. Using the C++ parsers and XSLT
processors rather than the Java based ones might
take hours or days off the program run time.

Or consider what happens in a web browser like Firefox
or IE, where a user may have 10, 20, or 40 web pages
open at once. Or a word processor where a user might
be editing a 10 MB technical manual and do a search
for some words, or format a document for printing. Or
an image editor like Photoshop or GIMP where a user
might have a 10 megapixel image open, with five or six
editing layers and multiple levels of undo.

Or consider command line tools like grep or wc or
uniq. I can process a file with one of those tools
faster than I can load and initialize the Java virtual
machine, never mind load a Java program and run
it.

I understand why detailed memory management,
programmer supplied destructors, and multiple
inheritance seem scary to you. They do put more
demands on the programmer and make it harder
to produce a bug free program. But they are still
justified for some projects.

Some people would say, Why use Java? Why not
do everything in Excel, or a declarative language like
SQL, or RPG (that's "Report Program Generator", not
"Rocket Propelled Grenade" :)) But you can't solve
every problem with simple tools. Sometimes you
need a more complex tool like Java.

And sometimes you need a still more complex
tool like C++, or a simpler but trickier one like C.

I would venture to say that, until computers become
many times faster than they are now, with many times
more memory (which will eventually happen) there
will not be a popular word processor or web browser
or photo editor written in Java. And it will be many
years more before we see system software written
in Java.

Alan


.



Relevant Pages

  • Re: How did C++ beat the competition?
    ... design of Java that prevents it from being as efficient as C++, ... into the design over the years. ... Efficiency is supposed to be built into the JVM, ... >>produce useful code, so there was a lot of initial wins. ...
    (comp.lang.cpp)
  • Re: How did C++ beat the competition?
    ... Efficiency is supposed to be built into the JVM, ... > is to produce useful code, few Java programmers bother, which is why ... > produce useful code, so there was a lot of initial wins. ...
    (comp.lang.cpp)
  • Re: RFC: Writing Solaris Device Drivers in Java
    ... > For efficiency and since the low level stuff is a major part of device ... I guess we would see drivers in Forth before:) ... unbelivebly Java performed better than ...
    (Linux-Kernel)
  • Re: Computing efficiency
    ... >>What is the efficiency difference between different language, ... I'm most interested in the difference between Java, C, ... > efficiency of picky details in language implementation. ...
    (comp.lang.java.programmer)
  • Re: Is anything easier to do in java than in lisp?
    ... Java Applets don't usually work. ... truly platform independent web browser would make sense, ... case using the appropriate web browser for each platform the text-mode ... > Common Lisp and it needs a Common Lisp environment to run. ...
    (comp.lang.java)