Advantages Of .NET Over Java
ansonyumo writes "ZDNet is carrying an article written by one John Carroll that outlines specific advantages of .NET over Java. It's written from the point of view of a Java advocate who has 'seen the light.' First of all, comparing .NET and Java isn't very fair; you have to compare .NET and J2EE. When you level the playing field, most of his arguments readily fall apart."
First off, I have to give him some credit. This is the first time I've ever seen a specific breakdown of exactly what
But would I trade J2EE for this? Not on your life. All of this stuff can be done in one way or another with Java, and Java is still way more mature in most respects. I mean, I'm assuming that since he chose to highlight these features, they're probably the most significant, and if this is the best that
If I was going to develop a new Windows app, I'd be doing it in
Still, I think .NET is going to be a disaster. Microsoft is trying to make it do too many things at once. To them, it's not just a new enterprise software platform. It's a fix for all the shortcomings of the NT API. It introduces all the new programming features they never tire of dreaming up. And it does all this while retaining support for legacy languages, such as C++. AND .NET is supposed to maintain an easy migration path for Java programmers -- one that will make it impossible for them not to switch.
It just won't fly. They're trying to do too much, and they're making the same mistakes they made with NT and Win16. And even if they went at it right, .NET could never hope to make more than modest inroads into the Java marketplace. Too much investment in an established technology. (Microsoft ought to know better, given the way they've benefited from that same principle.) The best they can really hope for is to find a niche where .NET excels, such as Web Services. This would parallel the career of other technologies (Cobol, PL/1, SQL, and of course Java itself) that were supposed to take over the world, and ended up just finding their own place in it.
The big mistake with Cobol is not that its syntax is too complex. Most early languages had that problem. But in Cobol's case, they made the silly assumption that a language with a superficial resemblance to ordinary English is somehow easier to learn. Thus in Cobol you can write:
The problem is that Cobol is not a subset of English, it just looks like one. Cobol uses ordinary human constructs, but doesn't save the human from having to learn any abstractions.Detractors of C are fond of calling it "high level assembly language". I think that mostly comes from the use in C of pointers, which seem much too similar to machine language memory pointers. Now it's true that C pointers are not as sophisticated or foolproof as object references (Java and most other OOP languages), but they're still more than memory values. Consider,
If you translate that to assembly, you'll see a difference that's a lot more than syntactic sugar.The basic issue between C++ and Java is not SS, but general complexity. So Java leaves out default parameters, operator overloads, and multiple inheritance, some other stuff.
Huh? I'm not saying that the only difference between C and assembly is syntactic sugar. Far from it.
What I was pointing out that is that judicious amounts of syntactic sugar are extremely convenient to programmers, and hence simply being SS is not enough to dismiss a language feature. Yet this is routinely done in the programming language community, as illustrated by the real life example in the first message (not mine) of this thread.
The original message didn't characterize anything as syntactic sugar. It only said that C#-style delegates never got into Java because JavaSoft thought they were "syntactic sugar". And it sounds like this version of history comes from Anders Hejlsberg, the inventor of delegates. Given the long standing feud betwee Hejlsberg and JavaSoft both when he was at Borland and later at Microsoft, I doubt if the argument was as simple as that.
I'm interested to read your comments GCP as I'm a longtime Java programmer as well. When I read the C# spec I found that the vast majority of the language additions over Java were the classic Microsoft shortcuts that cloud a language and reduce clarity. This is of course with the one great exception of delegates, which I am totally in favour of.
It seems there is a danger as we get more experienced with programming to want to get fancy with our syntax and so on, but I think Java neatly constrains this desire and guides us to write clearer programs. This is why projects in Java are so successful at producing reusable open source components, and using those components as building blocks.
This is all involves personal preference of course. However, when I download a library for a program I'm working on I know there'll be an lower bound on how bad or obfuscated the code will be, most of the additions to C# lower that bound significantly.
C#.NET advantages come
.NET will last forever in general application development. App development with ATL, Win32, x,y,z is a nightmare in some respects. .Net will do for windows what Java has done for computing.
1) from taking everything good in java
2) adding cleaner COM+ integration and windows integration.
Thats it.
Now Java 1.5 will fix alot of issues i have with java and it removes one of the reasons (1) for moving to C#.NET.
(2) is going to be difficult for java to level. Having said that, (2) is the reason why