POST OF THE DAY
Microsoft
Is Java Hot and Going Strong?

Format for Printing

Format for printing

Request Reprints

Reuse/Reprint

By aschafer
June 7, 2001

Posts selected for this feature rarely stand alone. They are usually a part of an ongoing thread, and are out of context when presented here. The material should be read in that light. How are these posts selected? Click here to find out and nominate a post yourself!

Unfortunately, I am going to have to disagree that "Java is hot, and going strong."

Let me start by saying I love Java as a language, and I had to write an interpreter in grad school. The research done behind flow analysis and optimization of the language is only beginning to surface. Of the modern mainstream languages, it is definitely one of the best.

But Sun destroyed its future. They kept all revision control of it locked up in their company. Anyone who tries to adapt the language for public use is immediately taken into court.

Why do they do this? Obviously they want complete control to direct Java's future. They also want one version and not many different vendor-independent extensions. This is a reasonable claim because they want it to remain platform independent.

However, this is its Achilles heal.

Time-to-market is reduced for most Java libraries because they have to work on every platform (or at least the popular ones). Just ask any QA guy who has to test the code.

For that matter, ANY program that wants to be platform independent takes longer to release, not just the foundation components like libraries. Why would this be if the language is designed to work on any platform? Because the virtual machine specification is not the most detailed and complete thing in the world and quality control and compliance for virtual machines is left to the developer. So they all work differently. It is like a few years ago when you had to write HTML that worked for IE and Netscape. Simple things were fine, but most things complex would always work on one and not the other.

There are some shops that have the ability to specify exactly which platforms and virtual machine are used. This does not eliminate all problems, especially if there are hardware specific reasons for doing this. Because most everything dealing with Java has to be designed to work on any platform, it is very difficult to find 3rd party libraries that address specific hardware needs. So it is usually back to C++ in these cases.

This leads to a similar issue. Yeah, lack of pointers and strongly typed variables are great for rapid development. Use them whenever possible, especially those junior developers. But that really limits what you can do. I mentioned hardware addressing before, but how about data structures and algorithms? Dammit, sometimes I want to inject that machine language into the next memory execution point so my virus...never mind.

What else do data structures and algorithms limit? Speed. You cannot optimize them very well with Java. Also, speed in the execution of the program is effected as well (they are different). Java can crawl at times as compared to non-Java programs. I am not sure why, though, but that is the case. I learned from my studies that there was plenty of room for speed optimization.

Resource usage is an issue as well. I don't even want to get into the reasons why, just trust me by looking at the memory footprint of a java program.

Java also does not play well with others. You will go through more frustration trying to get Java to work with non-Java components, that you may as well write the components yourself.

There are even non-technical issues. User interface. Menus and Windows are the same CONCEPT on each platform, but do they look the same. You would not believe how many users get confused when things start looking different, even if it is a minor thing like a close box -- on the Mac it is hollowed, on a PC it is a box with an X in it. And every Java program looks the same on every platform.

As I said, most of this is because of Sun. I think by the time Sun realizes these problems should be addressed, it will be too late for Java.

I hate to sound like a Microsoft crony, but they have learned from Sun and addressed many of these issues in C#. C# is not controlled by Microsoft. After the initial development, Microsoft released it to a "standards" organization (Note: Only government agencies can stamp things as standards). The industry now directs C#'s future.

Microsoft has set up a compliance test for all .NET virtual machines. Microsoft has to approve them before they can be released.

C# has an unsafe mode. You can section off code as "unsafe" where you can use pointers and generic variables and all those good C++ things.

Microsoft says C# will be about 10% slower than the equivalent C++ program. I have yet to see this though so I cannot substantiate it with fact.

No doubt, C# is Microsoft's version of Java.

However, many Java programmers who have used C# are really looking forward to C# (yes, it will be available on the NIX platforms). I can find links to these statements if the cite police need me too.