← Back to context

Comment by goto11

11 hours ago

C# was always better than Java as a language. The strength of Java is the ecosystem, and Java being open source and cross-platform from the beginning.

That used to be the case, but I would argue that C#'s ecosystem is just as competitive now. For our backend tech stack at work, all of our libraries used are open source nugets. Back 15 years ago, paid nugets were definitely more standard.

Language design isn't just about adding every possible feature. For example, someone mentioned operator overloading. As someone who has written a lot of Scala, I think operator overloading would be a very bad feature for an enterprise language like Java which needs to be consistent above all else. I never understood the obsession some people have with the C# vs Java debate anyway. Generally, both languages are very good at what they do, each having its own set of advantages and disadvantages. Regardless, a developer can pick up the other language with basically no effort.

  • > I think operator overloading would be a very bad feature for an enterprise language like Java which needs to be consistent above all else.

    Operator overloading increases consistency. Instead of having

      int a = b + c;
      CustomNumberType x = y.add(z);
    

    you have

      int a = b + c;
      CustomNumberType x = y + z;

    • The problem with operator overloading is it makes things confusing when mixing types and let's programmers write confusing code.

          Person x;
          Job y;
          CustomType z = x + y;
      

      WTF is Z?

      Is the argument, anyway, I support operator overloading.

      3 replies →

To the point that after all the drama with J++ that lead to .NET and C# development, Microsoft nowadays is also an OpenJDK contributor with their own distributions, and official developer advocacy channels on YouTube, conferences and devblogs.

Turns out they really want to have plenty of Java development on Azure as well.

Java wasn’t open source at all from the beginning.

  • And the binaries, the default sdk when using java, i.e. oracle jdk, is still not open source, encumbered with a mine field of legalese. For a long time it also included malware as ask toolbar. Stay away.

  • No, but it was free/gratis distributed on almost every developer magazine shipping with CDs.

    One of the reasons why it took off.