Coffeehouse Post

Single Post Permalink

View Thread: Think for yourselves...
  • User profile image

    Can't agree with most of that.

    In general, I find that MS folk are probably the most critical of the stuff they use, with the exception of Java bods.

    Go on to a Linux or Mac forum and try to utter one word against the mother ship ... then see what happens.

    Is c# a better language than Java? Obviously. MS had the benefit of being second (again) and so could look at the mistakes made with Java and improve on their own version. Sun also has the opportunity to fix the problems with the Java language, but is so afraid of breaking backwards compatibility, they just hack the changes into the language, so they come out half-baked and unusable or worse, dangerous.

    There is a howler of screw up in the latest Java release that means autoboxed numbers between -127 and 127, will give different results on the == operator to numbers outside of that range.

    Integer a = 10, b = 10 ;
    Integer c = 129, d = 129 ;
    System.out.println( a == 10 ) ; // A
    System.out.println( a == b ) ; // B
    System.out.println( c == 129 ) ; // C
    System.out.println( c == d ) ; // D
    > true
    > true
    > true
    > false

    Autoboxing Horror!
    An unusual way to test the numbers in Java I grant you, but still a stupid mistake to make. The result should be consistent no matter what numbers are used.

    This unwillingness it change the JVM means that a lot of stuff that should be built into the language, is hacked into the libraries, so we get more and more bloat, and ease of use starts to fly out of the window.

    ... and this is why Sun is now less focussed on the Java language, and concentrates most of its efforts into making the JVM multi-language engine ... which Microsoft always believed was the correct approach in the first place.
    As well as Ruby, the JVM now supports the excellent Groovy scripting language, and a few other oddities that Sun has been cooking up in its labs.

    Their effort with JavaFX, an effort to take on SilverLight, is laughable.

    Now, should c# be taught in schools? No.

    Java is cheaper for schools to teach, and in such an environment, the differences between the two languages are not so pronounced. Since Java has less functionality than c#, it's actually very good for teaching the basics of OO. Stuff like delegates can be taught later. The relative quality of the IDEs (and as good as it is, I don't think VS beats JetBrains IDEA) doesn't matter, because no decent programming course should be teaching with an IDE in the first place.

    Java also enjoys a library of third party toolkits that pretty much dwarfs anything else anywhere.