• pinball_wizard@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 months ago

      I have never of anyone calling C# Java.

      Sounds like you missed the fun of it’s first release. We (C# developers) all called it Microsoft Java.

      Edit: I remember answering the question "What the hell is C#?!” with: “It’s Microsoft Java”.

      It gave folks new to the language all they need to know: It aimed to solve the same problems as Java, and didn’t have Sun’s commitment to Open Source behind it.

  • masterspace@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 months ago

    C# is just flat out objectively a better language, in virtually every single way

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Eh, I’d argue that Java and C# are in the niche of having few features. While I don’t like this niche, Java having even less features makes it stand out more in this niche. If you’re looking for a language with more features than that, then there’s so many more feature-rich choices than C# that I just don’t feel like you’d choose C#, unless you want Java with integration into the Microsoft ecosystem.

      • tias@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 months ago

        Well it’s always about finding a good balance isn’t it. Too many features like in C++ has negative consequences. Preferably you want something that lets you do all that you need to do, but not more. The trick to designing a good language is to let developers achieve as much as possible with as few features as possible, while keeping the code easy to reason about and understand.

        This is obviously both subjective and highly dependent on what problem you are trying to solve, but I can’t think of any situation in my career where C# would not have been a better a choice than Java from a strictly technical perspective. It’s not just that the C# language is better, it’s that the Java ecosystem is founded on poor design choices that result in code bloat and implicit behavior that is hard to troubleshoot and secure. See e.g. Spring, which automatically picks up and loads any logging library that happens to be in the user’s path, even if that is an exploitable version of log4J. Java has become corrupted by enterprise architects. This satirical project demonstrates what I mean.

        I say this as someone who is currently developing a FOSS Java library in my spare time, out of frustration with the Java code I had to endure at work.