H
Harri Pesonen
Jim said:When I read this I thought: "Oh, good - I don't know much about C#, maybe
I'll learn something about why it may be better than Java." But then I
read this: "it is a next generation product." and thought: "How
disappointing - He does not really give a reason, but just uses an
essentially meaningless phrase. He doesn't even give any kind of
definition for 'next generation product', which might have at least given
some sense of why C# is technically better than Java."
Simple. Just like Java builds on C++ and Visual Basic, C# and VB.NET
build on Java. Java took the best features from C++ and Visual Basic:
* C++: classes and general syntax
* VB: ease of development, virtual machine, no freeing of objects, COM,
UI components
Java added garbage collection, JIT compiling and a reasonably good
library (Java Platform API). Since then many of the original library
features have been deprecated and replaced with new versions, and whole
new APIs have been added to fix the problems in the original ones:
AWT => Swing
IO => NIO
Date => Calendar
C# and .NET platform have been designed to have the best features from
Java, without the burden of deprecated API or language features. Java
1.5 proves that C# is/was ahead of Java in many ways. .NET platform
performs better than Java in Windows, because it uses native Win32 UI
features, while Swing suffers from bugs and incompabilities and is slower.
C# has "using" statement that makes sure that the resource is freed
(disposed) correctly.
In C# "switch" statement works with strings.
C# has structs for creating new primitive types.
Did I mention that C# has verbatim strings, which are good for regular
expressions and multi-line SQL statements...
I could go on, but C# is simply superior to Java (in Win32). I hope that
Java gets better, Java 1.5 sounds very promising.
Harri