Quote:
Originally Posted by Xav
In terms of power, C# with .NET is the most powerful, presuming your user has the .NET Framework installed. For cross-platform, Java has a similar syntax, with other things the same, such as garbage collection.
|
What's your definition of power?
C# has some interesting abstractions that Java doesn't have. You can acquire them (with interest) through Scala though and the Scala compiler manages to match Java for performance because of it's type inference system. Scala is one of these sane languages where typing is optional rather than being one or the other with nothing in between.
I've never seen any hard figures that .Net beats the JVM for performance. I have seen some very solid comparisons of JVM performance to C and C++. If .Net beats the JVM then it does something rather magical because in raw performance the JVM is pretty much as good as it can get for a virtual machine.
Where Java struggles is, as I mentioned, poor libraries that hinder performance. Swing is one example, running the entire GUI library through the JVM is not necessary to gain the portability benefits of Swing. Another is the old synchronised collections that run half as fast as the newer ones (ArrayList and Hashmap are twice as fast as Vector and Hashtable in general use). Also cold start time is poor because of bytecode validation that .Net does not do. The next JVM will have pre-compilation AFAIK so it may kill both the bytecode validation issue and the Swing performance problems.
The real problem with both is the predominance of over engineered frameworks and API's that are too complex for their own good. People aren't running from Java because the language itself sucks. Nor are they doing it because the JVM is poor. The real problem is things like J2EE with mountains of XML configuration files.