• flamingo_pinyata@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    2
    ·
    5 days ago

    I am a programmer but I’m not sure why people think Java is suited for anything, especially a system so sensitive to bugs. It’s so hard to write high quality readable code in Java. Everything is way more clunky, and verbose than it needs to be.

    Some major improvements were made with versions 17+ but still, it feels like walking through mud.

    It’s a language from the 1990s for the 1990s.

    Btw the performance is actually pretty good in Java, the old reputation for slowness is entirely undeserved today.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      4 days ago

      It’s a verbose language but I don’t know if there’s any real language that encourages highly readable code beyond low-level syntax. You want to create a God-class in Python with nonsensical variables and 5 levels of nesting? The language won’t stop you.

    • futatorius@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 days ago

      Anecdotally, Python is about three times as concise as Java. You have to write lots of boilerplate to do anything much more complex than Hello World in Java. And one of the oldest and most reproducible results in software engineering is that the defect rate is proportional to the number of lines of executable code. The more concise the language, the cheaper it is to maintain. This has been measured in hundreds of environments, with dozens of languages, over decades.

      Python is slow, though, so there are some situations where it’s not a good choice. But those cases are probably less numerous than you might assume. There have been a few occasions where I was told Python would be too slow, I’ve then built a proof-of-concept, and it was more than fast enough. People suck at knowing where bottlenecks are in complex systems.

      And now that the Python project has finally bitten the bullet and taken measures to allow removal of the GIL, things might improve considerably, though Python’s dynamic nature and some features of its type inference mean that some things it does will never be ultra-speedy.

      • flamingo_pinyata@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 days ago

        I wish Java was declared deprecated back in 2017 when Kotlin was adopted for Android and supported by Spring. It was the only sensible way forward for JVM. Sure with containerization there’s some debate for the necessity of JVM at all but its GC and runtime optimizations are nice.

        • Mihies@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 days ago

          Java has still an enormous adoption, though. It’d be very self harming making it deprecated. And I don’t think containerization solves majority of cases, perhaps it does it better in backend. So both GC and Java are here with us like forever 🤷‍♂️