Slashdot Mirror


C# To Crush Java?

Hector73 writes: "Cringely predicts that C# will blow away Java in the upcoming years. He raises some good points, but fails to differentiate between client-side Java vs server-side Java. I believe the bells have tolled for SWING, but server-side Java is holding strong."

5 of 93 comments (clear)

  1. My letter to Bob by hardcorejon · · Score: 5, Informative

    Here's an email I sent to Bob. He used to do decent writing for InfoWorld - is that what happens when you get on the public dole?

    Hi Bob,

    I've enjoyed reading many of your columns over the years, but you really seemed to have missed the mark in the Java/C# battle, if it can even be called that.

    A few problems with C# world domination:

    1. C# Apps are tied to Windows, Windows, Windows. While this is fine and wonderful for windows developers, there are thousands of UNIX/Mac/mainframe/PalmOS/etc developers out there that will be left high and dry. And let's not forget, Java runs on everything from mainframes to smart cards.

    2. The "Java is slow" myth. More recent JVMs can actually perform as well as or BETTER than natively compiled code. This is because they do just-in-time compilation, making the Java code as fast as native machine code.

    Also, there is only so much optimization the compiler can do when you compile a program, having no idea how it will actually be used when it is run. At runtime, there is a lot more information available to the system as to what parts of the code are the real bottlenecks. Recent Java implementations employ *dynamic* runtime optimizations, where parts of the program that run more frequently are actually recompiled in an optimized manner to improve performance.

    These dynamic optimization schemes are a very exciting new field for compiler and virtual machine engineers - and they are totally lacking from poor old statically compiled C#. The very way that C# gets compiled ties you to Windows, so dynamic optimization of running C# code will be all but impossible to implement. In the long run, Java has the potential to seriously outperform all statically compiled languages.

    3. Java is open. Sun develops Java APIs and technologies in conjunction with hundreds of other companies and individuals around the world. Anyone in the world can implement most Java APIs without paying Sun a dime (now if you want that little coffee logo on your product, that's a different story, the make you pay for interoperability test for that).

    While Microsoft seems willing to "standardize" C#, they will probably open up the language itself while holding the runtime libraries close to the vest. Imagine: what good would C have been if the standard C runtime libraries were vendor-specific? What this means for developers is a single-vendor solution, just like Windows.

    A large part of Java's success comes from the fact that you can put together applications by mixing and matching pieces from multiple vendors and be guaranteed easy interoperability. For example, you can build an ecommerce website by buying a Servlet engine from Allaire, an EJB app server from BEA, and Java database drivers from Oracle - and they will all work FINE together - AND you can pick any kind of hardware and operating system! Want your developers to work in Windows, but deploy the app on UNIX? No problem. Want to upgrade from your Intel-based Dell servers to Sun's new 64-CPU UltraSPARC machine? Your code requires NO changes! You don't even need to recompile it, because Java is not statically compiled!

    What's Microsoft's answer to this? Run everything Microsoft: ASP, IIS, ADO, etc. Develop the app on Windows. Deploy the app on Windows. Stay with Windows forever, and hope Microsoft is good about fixing the plethora of bugs and security holes that will inevitably arise. With C#, who will supply the runtime libraries? The clustering and high availability support? The windowing toolkit? Microsoft, Microsoft, Microsoft.

    Developers have learned long ago that single-vendor lock-in solutions are a recipe for disaster. If you can't swap out a buggy piece with a functionally correct one from a different vendor, you're tied to the poor-quality vendor (like Microsoft).

    Do not discount Java simply because you don't see lots of consumer applications written in Java. Java has serious momentum on the server side, where interoperability, distributed computing, and high availability make Microsoft-centric solutions very problematic.

    I could give more technical with reasons why C# applications will be inherently more unstable than theit Java counterparts (access to pointers and raw memory, unchecked exceptions are legal, Microsoft-grade security, etc.) but I think I might lose you :)

    So the moral of the story is: do some better research before you write a hype-filled article like you just did - a column that is so misinformed belongs on ZDNet, not PBS.

    Cheers,

    - jonathan.

    1. Re:My letter to Bob by mooneyd · · Score: 3, Informative

      Regarding Point 2: C# compiles to something like byte codes and can be either run interpretted, compiled just-in-time, compiled at install-time OR compiled at build-time. In fact, all .NET languages have these features. So not just C#, but all .NET languages (VB, C++, and for goodness sake Eiffel and everything else) will have the opportunity for the same dynamic compilation hoo-hah that Java is now enjoying.

    2. Re:My letter to Bob by luttapi · · Score: 2, Informative

      Take a look at this http://www.go-mono.com

      quoting from that site: "...A rough estimate is that we might be able to run our C# compiler on Linux by the end of the year. That means running the Windows Executable generated by a Microsoft .NET compiler on the Linux platform."

    3. Re:My letter to Bob by selectspec · · Score: 3, Informative

      While I agree with your points in your letter to Bob, I think you missed the most important point:

      Licensing Fee.

      Enterprize C# Licensing comes with a nifty $1500 per CPU application royalty.

      --

      Someone you trust is one of us.

  2. Re:who is this guy? by Anonymous Coward · · Score: 1, Informative

    Actually, Cringley's been a computer pundit since the 80s. I remember reading his articles in Infoworld when I was younger.

    For the most part, Cringley has always been on top of current events. His predictions, however, range from almost psychic to out there in left field. He's been in the business for quite awhile, though, and I don't think you can really cast aspersions on his credibility.