Swaroop C H

blog books about contact subscribe

Java 1.5 beta

06 Feb 2004

Java 1.5 beta codenamed "Tiger" was released today. I see that a lot of good things from C# have been taken up. For example, boxing and unboxing in C# is now in Java and is called autoboxing and auto-unboxing (No, it is not manual in C#, it is also auto).

Java also has a new twisted way of the foreach loop in C# but still sticking to the keyword "for". In the C# world you do things like

foreach (int i in somearray)
{
   // blah blah ...
}

In the Java 1.5 world, you do the same thing as

for (Integer i : somearray)
{
   // blah blah ...
}

Now, even enum is finally in Java 1.5 . If only they could add value-type structs in Java, that would give a huge boost to Java performance. Moral of the story? That Java and C# are taking so much of each other's features that it is hard to draw a line between them.

So choosing between them is based on factors like performance (.NET easily wins over Java here), philosophy (Sun vs Microsoft), multi-language interoperability (lots of languages in .NET vs Java). Needless to say, I don't think any of them are going to become the one standard platform. Both are going to compete and will be the two standard choices for a platform. Competition is good!

Feedback

There's no comment box, but please do email me or tweet me your thoughts and criticisms, and I will publish the relevant ones here.