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."

23 of 93 comments (clear)

  1. What a crock of crap! by manyoso · · Score: 2, Insightful

    Perhaps CSharp will surpass Java in the hearts and minds of programmers in the years to come...? _Perhaps_!

    Basically the only reasons this article gives for this supposed eventuality is: "Java" is "bulky, slow, and buggy." and "Now Java just plain feels old."

    And then the author has the audacity to say, "Sun is giving up, descending to name-calling."

    Just some more FUD. Nothing to see here. Move along.

  2. Not Likely. by fava · · Score: 3, Insightful
    One thing you must remember before writing Java off compleatly is that Java is the language being taught to most University CS students, I cannot see all these recent graduates deciding to abandon Java in favor of C#.

    As well many companies that are using Java are doing so primarly because it is portable. C# lacks that feature.

    1. Re:Not Likely. by Hector73 · · Score: 3, Insightful

      One thing you must remember before writing Java off compleatly is that Java is the language being taught to most University CS students

      So was PASCAL ...

  3. At the risk of stating the obvious.... by pwagland · · Score: 3, Insightful

    We all know that Microsoft make great marketing solutions. Sometimes, these are even really great products. But the key point here is, as Cringley said, microsoft will market C# better than Sun did Java. And because it is marketed better it will get mindshare. And once it gets mindshare, it will get marketshare. One step at a time...

    However, C# is still windows centric. To a lot of people this means diddly squat. If it allows you to work more easily to your target platform, then people will use it. Witness the success of Visual Basic as proof. And that thing is a cow if you ever have to maintain the "code" that gets produced with it.

    This is not all bad news however. Despite the success of VB, there is still a "niche" market for C programmers. Just as there will be for Java programmers. And the split will go roughly the same way I think. On non-microsoft and server platforms Java will continue to be used. On the "frontend" microsoft boxes then C# will become the new Visual Basic...

    And sure, we "profressionals" will deride these "sellouts", and pretend that we are somehow superiour. But in reality, it is just people using the most appropiate tools for the job at hand.

    1. Re:At the risk of stating the obvious.... by big_hairy_mama · · Score: 2, Insightful

      Visual Basic is ugly, and always has been. But there are already millions of Java programmers, most of whom took up Java because a) it's an easy language and they wanted to move away from VB, b) they like its cross platform capabilities, or c) they like its cross platform capabilities because they don't like Microsoft (see (a)).

      I remember reading another /. article saying that Java was poised to become even more dominant than C/C++. Many of these Java developers probably took it up so that they could program web-based applets and such. And the reason why Java is a great web/applet platform is because of its cross platform nature. Are these people going to switch to C# all of a sudden? It defeats the original purpose of applets and Java.
      So how is Microsoft going to switch all of these people? Mostly, I think it will be people who say "I like Microsoft, I like Java, and I like VB (ant want to re-use my old code); let's combine them all." But the number of people who want this, is, from my viewpoint, much less than the number of people who want to stay away from old buggy VB code and proprietary solutions.

      So in summary, I think C# is the one that will have a "niche" market, and Java will be (and already is) far more mainstream.

  4. 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 mooneyd · · Score: 2, Insightful

      Oh and regarding point 3: All .NET programs will run on all platforms which have a CLR (Command Language Runtime) available - kind of like... err.. exactly like a JVM. When .NET is released, CLRs will be available for Windows 98, ME, NT4, 2K, and XP which covers what percentage of computers in the world? Probably something close to the number of platforms available when JAVA was first released.

      Once .NET is understood it is easy to see that the architecture is extremely similar to JAVA while learning from some of JAVA's mistakes.

    3. Re:My letter to Bob by OmegaDan · · Score: 2

      Its widely known that JIT compilers can only reach about 30% of the host-native speed due to the branch perdiction problem ...

      In no case will it be"as fast" then native code

    4. 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."

    5. Re:My letter to Bob by ban · · Score: 3, Insightful

      I may be completely stupid but I happen to work at a company that is developing a server side VM for Java and I really don't understand what you mean with "the branch prediction problem".

      Are you assuming that static compilers do some kind of interprocedural or whole program analysis? This is normally not the case.

      Do you think that you can't do inlining or method specialization where you take runtime information into account in a JIT? You definitely can.

      Our VM does advanced optimizations at runtime that amongst other things take single implementations of methods into account. These optimizations can be undone at runtime when new classes are loaded that invalidate the assumptions that the optimizations are based upon.

      This means that you won't do virtual dispatches to methods that only have a single implementation.

      Try to do that with a static compiler for a dynamic language.

    6. 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.

  5. I agree...but I don't by MrBlack · · Score: 3, Insightful

    I agree. Microsoft has put a huge ammount of effort into developing a quality platform in .NET, and they are betting the farm (or at least appearing to do so) on .NET. Certainly if .NET flops MS will lose face, and lots of money, but I don't really see the success or failure of .NET affecting their core monopolies. Windows and Office. I see this as MS's attempt at condsolodating their stock in the server arena, which is where other vendors like Oracle and Sun have been traditionally strong. Server-side Java rocks, and that's where MS is attacking.

  6. mod original article downto 'troll' by cowtamer · · Score: 4, Interesting

    But I'll bite anyway :)

    Java became popular in the first place because:

    1) there was a genuine need for a truly cross-platform language that had built in graphics, networking, etc. (no matter how bloated or buggy)

    2) SUN set up indoctrination camps for IT managers and marketed the heck out of Java

    3) SUN bribed colleges into teaching Java
    (My school had dropped C/C++ completely in 1997. All the computer labs are donated by Sun)

    No matter how dominant Microsoft is, I just don't see them doing what SUN did with Java and getting the same mileage. At best, they will manage to replace Visual Basic. Why would a sane (non-MS)development shop switch to a Windows-only language from something that is cross-platform? What will C# buy me that Java/C++/Visual Basic does not?

    Of course, if C# does (by some cruel twist of fate) become dominant, I would _hate_ to see what the average programmer looks like in 10 years. The _average_ "Java programmer" already acts like a brain-washed zombie posessing no problem-solving skills other than using existing Java APIs. Just imagine a world populated by the Microsoft Centric version of the same breed...

    "Java is a peculiar mixture of hype and sound technology"
    --overheard at a CS colloquium circa 1997

  7. C# vs Java by qbalus · · Score: 2, Insightful

    Sun is excellent at computer plumbing, and has the track record to back it up.
    Microsoft has dominiated the eye balls of the end-user and they too have the track record to back it up.

    C# vs Java is a race for volume, just as IE and Netscape was a race for volume. This race won't turn out the same way though because game has changed

    And that game is Open Source. Open Source is the wild card in this battle. Without Open Source, I believe Microsoft would win in short order.

    qbalus

    1. Re:C# vs Java by big_hairy_mama · · Score: 2, Interesting

      Since you're obviously one of the open source advocates who hang's out on /. (I'm not really complaining, often I am too), I just have to point out that Java and/or Sun is not open source. Sure, I can look at the source for the API, and I can file a request for enhancement, or if I'm a big company I can even have some input on the language itself. And many Java projects also happen to be Open Source. But Java is not open source. I think at least some of its appeal, however, is that it is also not Microsoft.

    2. Re:C# vs Java by Martin+S. · · Score: 2

      > I just have to point out that Java and/or Sun is not open source.

      Actually Wrong. Java is 'open source' in a literal sense (sign the agreement and get a copy, easy as pie). It not Open Source in philosophical sense, it's not covered by a GPL compatible licence.

      >And many Java projects also happen to be Open Source.

      I think this is closer to the point actually being made.

    3. Re:C# vs Java by Martin+S. · · Score: 2


      Since whenever you sign this licence.

      http://www.sun.com/software/communitysource/inde x. html

  8. who is this guy? by ameoba · · Score: 2

    Honestly, I don't know this Cringley guy from Adam, but I don't see any reason to give him credibility. I mean, the link goes through PBS. Now, PBS is considered a good source for relatively unbiased information, but they are -not- exactly considered a major powerhouse when it comes to reporting on current events, technical or not.

    --
    my sig's at the bottom of the page.
  9. Bogus, all cause of one analogy... by FortKnox · · Score: 3, Insightful

    J2EE

    C# has nothing that can compair to J2EE. The bonus' you get with J2EE in a large-scale system will easily destroy anything .NET can come up with.

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
  10. Why are /.'ers even READING Cringely?!?! by jbuilder · · Score: 4, Interesting

    Let's keep a few things straight... Shall we? Oh, I think we shall.

    First.. Cringely is a moron. In fact, he's not even the *first* Cringely! He's to tech journalism what the Dread Pirate Roberts in the Princess Bride is to that whole story line! He's a buffoon who took the name from the *previous* Robert X Cringely (and he's either the 4th or 5th RXC the last time I counted). He has no real background in computers and is *hardly* qualified to comment on anything tech related, forget about commenting on languages. Hell, I wouldn't be surprised if he won't the right to take over the name in a poker game over a few (dozen) beers.

    Next.. Let's talk about the creator of C#, Anders.. aka the near killer of Borland Pascal. This guy doesn't have a CLUE about what makes object-oriented languages truly functional. And perfect examples *include* Delphi and C#. Delphi is finally becoming a 'real' OO language *since* his exit from Borland. And what does he do when he first get's to Microsoft? He makes ANOTHER Delphi - including all it's early shortcomings as a developing language, but changes the Pascal syntax for C syntax. The end result is a language (based on C) that is effectively castrated of it's most graceful and useful (C-specific) features. Ander's did you learn nothing from your years at Borland?

    Also, how in the name of hell is C# (a Windows-only compiler at this time) going to EVER enter the Java (cross platform) space?? The answer is simply, it won't. No one is going to write a free C# compiler just for Linux and Solaris and with Java available in those platforms already C# is going to have an uphill battle (to say the very least).

    Next - and you people who keep saying this either don't use Java or read the Microsoft websites too much - SWING IS NOT DEAD! Swing has more commercial applications written in it now than ever (JBuilder, AppGen, and basically everything from TogetherSoft is just the tip of the iceberg and are just to name a few). Now I'm *terribly sorry* if Java has pump a crimp in your plans to take over the world with Visual Basic, but now it's time to learn a REAL language and use REAL tools to develop REAL applications. Not a damn OLE automation controller with a half-ass scripting language.

    --
    Polymorphism -- It's what you make of it.
    1. Re:Why are /.'ers even READING Cringely?!?! by miguel · · Score: 2

      I think you are confused.

      There are people working on C# compilers and runtimes for non-Windows platforms. Mono and Portable.NET are both working on the problem.

      C# is actually a very good object oriented language. There is a complete type unification in C#. In C# structures and basic data types (like int, char, double) can be treated as objects with no hacks attached (I am not familiar with the Java hacks, but those who know claim that Java has some kind of difference between int and integer, or something like that).

      C# is very much like Java, with a few extensions: properties, events, delegates and contains support for attributes (arbitrary metadata you can attach to language elements).
      \

  11. M$ AstroTurfer copped in java.sun.com by Martin+S. · · Score: 2

    It seems that once again we have solid evidence of a M$ AstroTurfer. This time on the Java.Sun.Com Advanced Languages discussion board. Apparently the Author of a C# book, advocating the article, advocating the book, advocating the technology.

    http://genamics.com/developer/csharp_comparative .h tm
    http://forum.java.sun.com/profile.jsp?user=98551
    http://www.amazon.com/exec/obidos/ASIN/059600079 0/ ref=ase_genamics/102-2503511-3184958