Slashdot Mirror


Even Sun Can't Use Java

cowmix writes "It turns out that Sun does not eat its own dog food. Specifically, this internal memo from Sun strongly suggests that Java should not be used for Sun's internal projects. More interesting still, they go on to state which other languages fullfil Java's goals better than Java does itself. Finally, the memo states Sun's own Solaris is the cause of many of Java's woes. Yikes."

16 of 732 comments (clear)

  1. From the article... by Whispers_in_the_dark · · Score: 4, Informative

    A study performed by an outside team appears to indicate a rough parity in performance between Java and a common implementation of another OO language called Python (see IEEE Computing, October 2000, "An Empirical Comparison of Seven Programming Languages" by Lutz Prechelt of the University of Karlsruhe). Both platforms are Object Oriented, support web applications, serialization, internet connections and native interfaces. The key difference is that Python is a scripting language. This means there is no compilation to byte code so the Python runtime environment has to do two things in addition to what the Java runtime environment does. It has to perform syntax checks and it must parse the ascii text provided by the programmer. Both of those tasks are performed at compile time by Java and so that capability does not have to be in the JRE.


    Assuming the memo is for real, this is a real boon for the Python community, even though it gets the bit about bytecode compilation wrong (Python DOES compile to bytecode and one CAN take the bytecode and ship without source). The point about Python carrying its compiler with it is true but IMHO it is a feature, not a bug. It always bugged me that Java had no good mechanism to compile simple expressions on-the-fly.

    I am, however, a little leary on the performance parity bit. Don't get me wrong, I love programming in Python, but I know from experience that it still costs a good bit to create all the dictionaries that are used for frame construction, global maniuplation, and object management.

    Python is, however, fast enough for a great many applications. I'm just a little skeptical about it being quite as fast in certain aspects.
    1. Re:From the article... by HorsePunchKid · · Score: 3, Informative
      You missed one of the best options for this kind of thing in a Java environment. See my previous post regarding BeanShell. It's an excellent piece of open-source software. Oh, and don't forget Ant.

      --
      Steven N. Severinghaus
  2. Read the Article by sparkhead · · Score: 5, Informative

    In the rush to bash Java, the summary here was totally off the mark. From the article:

    A review of the problem indicates that these issues are not inherent to Java but instead represent implementation oversights and inconsistencies common to projects which do not communicate effectively with partners and users.

    And it goes on to mention issues with Solaris. Nothing about Java itself being inherently problematic, just issues with certain implementation.

  3. It's a hoax by Anonymous Coward · · Score: 5, Informative

    InternalMemos is notorious for running hoax emails. This email is no exception. It includes a number of inaccuracies and curious references. The comparisons with Python are just amusing.

    Doing a quick search on the names, you'll note that there's no reference to the sender anywhere in Google, let alone associated with Sun. Most of the folks in the CC list do not have Sun email addresses. They're probably friends of the hoaxer. The Sun folks in the CC list include a JavaOne and a guy who has himself on the J2ME JSR.

    I wouldn't hold out for Sun switching to Python. haha

  4. Political memos by panurge · · Score: 3, Informative
    Being an old cynic, I suspect there are too many long words in this memo for it to have gone very far up the food chain. Who are these people and what is their access to opinion formers in management?

    Not that I'm suggesting they are wrong, I have no way of knowing either way, I just think that producing memos like this - and getting them leaked - is probably not the smartest way of getting the declared objective.

    Admission: I use Java. It isn't perfect. It uses too much memory. It isn't hugely fast. But the applications work and the amount of debugging we have had to do is a tiny fraction of what I would have expected with C++. Its suitability for a given project depends on a whole host of factors not considered in the memo, and it would not surprise me if, for some internal Sun projects, it was inappropriate in its present stage of development.

    --
    Panurge has posted for the last time. Thanks for the positive moderations.
  5. Applets? What year are you in? by revscat · · Score: 3, Informative

    Anyway, regardless of the JVM, applets are only applets.

    I hate to sound trite, but the fact that you place so much importance on applets (they are, after all, the only example of the technology that you imply exists) leads me to believe you're not really versed in the current trends in Java. The simple fact is that no one use's applets anymore; certainly there is no new development going on in that area. Most Java applications are written for the J2EE platform.

    Even at that, those who do wish to write the modern equivalient of applets use Java Web Start, which is much more robust and doesn't operate within the confines of a browser.

  6. Re:Kiss and say goodbye to Java language!! by TheRaven64 · · Score: 4, Informative

    I hope this illiterate drivel was intended as a troll, but just in case it was not:

    Forget Java man and go to PHP!

    Java is a general purpose programming language, PHP is not. PHP is a scripting language designed for server side web scripting. Ever tried writting a server in PHP? You can't, it doesn't let you accept incomming socket connections.

    PHP is 4 times faster than Java technology 'JSP' (Java server pages).
    This tallies because compiled "C" program is 4 times faster than Java.

    I'm not sure where you get your numbers from (the link you post is to a non-existent howto in the LDP), but I doubt that they are accurate. PHP is an interpreted language, C is a compiled language, Java is a hybrid (Just-In-Time compiled). C is likely to be faster than both (although a JIT language can make use of run-time profiling for optimisation, so in theory Java could run faster than compiled C code, but this is new technology so it doesn't - yet). Primitives in C are typed, in PHP they are not. This means that PHP has a lot of type checking to do even for simple variable assignments. PHP is unlikely to be faster than Java (although it may still fit your needs better in other areas).

    PHP is a very lightening fast object oriented scripting language.

    PHP is not an OO language. PHP supports a few features of OO, but not the vast majority (public / private methods, inheritence etc). PHP Classes are more equivalent to namespaces than classes.

    PHP is 100% written in "C" and there is no virtual machine as in Java.

    PHP is an interpreted language (how many times do I have to say this?). There is a virtual machine, and it interprets the PHP script. The Java VM compiles the bytecode to native code at run time (and only once, when the JRE is started in server mode). <oversimplification>

    Nothing can beat "C" language

    This is the stupidest statement I have ever heard. C does nut support dynamic strings, so only a fool or a masochist would use it for simple text manipulation tasks (ever written a CGI script in C?). C has many advantages, it's a mature language so a lot of work has gone into making it fast. For this reason it is good for low level system work. It is not the best tool for every job. If the only tool you have is C, every problem looks like an operating system...

    Java programmers will really "LOVE" PHP as PHP class is identical to Java's class keyword.

    Java programmers will loath PHP. It doesn't properly support a large number of features found in Java, because it is not a general purpose language, and it isn't even an OO language. Web developers like PHP because it's simple. For a detailed criticism of PHP look at thi paper published at the UK Unix Users' Group last year. (And possibly read my reply to the criticisms made.

    The aim of java was to abstract the OS and windowing system away from the developer, and in this it succeeds quite well (although it still has speed issues and the API is baroque in the extreme in places - try creating a non-blocking port in Java if you don't believe me). PHP is an interpreted scripting language aimed at web design, which has agregated, rather than being designed. Comparing the two is a crazy as saying Mozilla is far better than Linux.

    --
    I am TheRaven on Soylent News
  7. InternalMemos is notorious for hoaxes by Anonymous Coward · · Score: 5, Informative

    InternalMemos is notorious for running hoax emails. This email is no exception. It includes a number of inaccuracies and curious references. The comparisons with Python are just amusing. Doing a quick search on the names, you'll note that there's no reference to the sender anywhere in Google, let alone associated with Sun. Most of the folks in the CC list do not have Sun email addresses. They're probably friends of the hoaxer. The Sun folks in the CC list include a JavaOne and a guy who has himself on the J2ME JSR. I wouldn't hold out for Sun switching to Python. haha

    1. Re:InternalMemos is notorious for hoaxes by MikeFM · · Score: 4, Informative

      Julian.Taylor@central.sun.com is the address Google came up with for me. Not sure if it's the right one. Seems close enough though.

      Since when are memos technically correct? You must work at a lot geekier place than I have. Not that I think InternalMemos isn't notorious for hoaxes.

      I wouldn't hold out for Sun to switch from Java to Python either but I really wish they would. Java blows. Python is easier to develop (fewer required tools etc) and runs a lot better under both Linux and Windows. Python (with wxPython) produces nicer looking more functional gui programs to.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  8. Re:Hypocrisy? by fitten · · Score: 5, Informative

    Well... The Inquirer had a blurb about this about a week ago, before anyone heard about any "memo".

  9. Re:Smells of a Fake by Erwin-42 · · Score: 3, Informative

    No, Python has had a generational garbage collector for some years (since Python 2.0).

    It still uses RC to immediately finalize objects but will collect cyclical garbage as well when it periodically runs.

  10. Re:Smells of a Fake by tom's+a-cold · · Score: 5, Informative
    Anyone that compares a scripting languate (python) to a full programming language that also as a VM has no clue. a scripting language has minimal overhead memory requirements because it does not have much of a memory management job to do.
    Your remarks about Python, and scripting languages in general, are not borne out by my own first-hand experience as a designer and developer.

    First, you make it sound like, in some sense, scripting languages are not as complete as "real" programming languages. And your comments about memory management make even less sense-- any language with OO features (and many without) are going to have to do dynamic allocation-- how else are object references going to be dealt with?-- and that means that they're going to have to deal with memory-management issues. And if you think that all scripts are like little baby shellscripts, you haven't been around much.

    I've developed medium-sized apps in Python and in Perl (on the order of 50K lines of executable code), and much bigger apps in Java. Python is semantically rich enough, and in most instances fast enough, to do anything that Java can do, and almost always with shorter, more readable code. The same can be said for Perl (though it requires more discipline to achieve the readability), and probably also Ruby and Scheme. From a software engineering point of view, I'd be happiest coding the whole app in Jython (the Python variant that compiles down to Java bytecodes), then recoding the hotspots in Java, or in some even lower-level language. Developers, even smart ones, usually guess wrong about what to optimize, so deferring tuning until you observe the working system is usually a good idea. Exceptions would be embedded and hard-realtime systems. Almost every business app I've seen is neither of these.

    This in no way eliminates the need to design your app before coding it, BTW, contrary to what some bozos who once read the blurb on the back of an XP how-to book might have you believe.

    When I did a demo of one Python-based app that I developed, my client was willing to accept a performance hit for the sake of better maintainability. When I benched its performance on one content-mangement task, it clocked in at 100 times faster than its C++ predecessor. Now obviously, a very clever C++ crew could have done a lot better than that. But in the real world, everyone's in a hurry and don't always choose the cleanest implementation. And when language features are too low-level, developers waste a lot of time reinventing "infrastructure." In this instance, they not only reinvented, but did it much more poorly than the developers of Python did.


    --
    Get your teeth into a small slice: the cake of liberty
  11. Perhaps you should read the letter b4 posting it. by malachid69 · · Score: 3, Informative

    Quotes from the article that show you didn't read the letter before posting it:

    "these issues are not inherent to Java"

    "We do not believe these flaws are inherent in the Java platform"

    "We all agree that the Java language offers many advantages over the alternatives."

    "The customer must locate that release and install it." That, IMHO, is complete BS. I never keep anything but the most recent version installed, on Windows or Unix. The only issue I have ever seen like this was with JHDL from Brigham Young, which used "assert" that was added as a keyword (due to customer requests) in 1.4 -- and it still works if you tell it to compile as 1.3 (javac command-line option). I personally would not support an outdated version when a version with bug-fixes is available for free.

    "Typical resident set requirements for Java2 programs include: Hello World 9M" Again, BS. I have a TINI board running that only has 8M of memory total, AND I have an old Handspring (8M) that has Sun's JDK and IBM's JDK and Java3D on it.

    "Each of these examples is simple, but they demonstrate the general problem that people cannot program for a particular release of Java and expect that their programs will continue to run." Again, BS. I have been coding Java since IBM released JDK 1.0.2 for Win3.11.... I have never had this problem with ANY code I have written.

    And their overall request? "We strongly recommend that management require Java to conform to the Software Development Framework ".

    If you would have read the letter before posting it, you might have realized that what they were really complaining about was Solaris 7 and 8. They even point out that Solaris 9 is fixed. The pieces of the letter that suggested other languages was specific to the Solaris implementation, as my comments above prove that their statistics are not valid outside of Solaris.

    So, Solaris pre-9 is buggy. Big deal, that has nothing to do with how fit Java is as a language.

    Malachi

    --
    http://www.google.com/profiles/malachid
  12. Re:Anonymous Inner Classes by Jerf · · Score: 4, Informative

    Why would they bring those up, and then within a sentence or two, mention Python. From what I understand, Python is mainly used for server side scripting. I doubt anyone uses Python for serializing anonymous inner-classes!

    No, Python is used for everything that a general-purpose language is used for, except anything best done in C is stuffed into C extensions. The exceptions are of course the standard exceptions for C, which basically owns systems programming. (The need for fast, tight code in Python is done by embedding C; see the Numeric extension which provides many very fast number operations comparable to anything else, because the operations are in C.)

    In general, Python has no need for anonymous inner-classes; anonymous inner-classes are a worthless hack in Java to provide things that should be provided through any number of other good mechanisms, and even then they only partially and frustratingly succeed. Don't take my word for it, take jwz's word for it (do a find for "mind-blowing worthlessness of inner classes", for instance, though it comes up several times as he mentions the lack of several better solutions).

    Inner classes, as implemented in Java, are an atrocious idea and I know of no other language, including specifically Python, that doesn't have at least one inherently superior mechanism for doing that stuff, and most have multiple. (Even Perl has closures!) Thus, they have no need for what Java means by 'anonymous inner classes'. (Inner classes can exist in Python, but they have so many more capabilities that it's not even close to comparable, and I only need them when I'm dynamically generating classes anyhow.)

    On the one hand, I'd say have a look at some of these other languages and use them enough to understand the idiomatic uses of the capabilities in those languages. On the other hand, I don't suggest it, as you may find it very difficult to program in Java again after you are done. Java is not a language designed to empower the developer.

  13. Re:THERE IS NO JULIAN S. TAYLOR @ SUN!!! by Queuetue · · Score: 4, Informative

    Really? Then who is Julian.Taylor@central.sun.com?

    I found Julian here and here .

  14. Re:THERE IS NO JULIAN S. TAYLOR @ SUN!!! by Jonboy+X · · Score: 3, Informative

    Yeah, see, the more recent of those 2 references is 2 1/2 years old. Sun's LDAP is pretty up-to-date, so I trust it. Maybe he used to work at Sun, but he doesn't any more. In the past 2 years, there's been a lot of that going around at Sun...

    --

    "In a 32-bit world, you're a 2-bit user. You've got your own newsgroup, alt.total.loser." -Weird Al