• abbadon420@lemm.ee
    link
    fedilink
    arrow-up
    36
    arrow-down
    1
    ·
    7 months ago

    I don’t really see how that is bad…? Java wants to be widely applicable and taking the best features from other languages helps that goal, right?

    • jaybone@lemmy.world
      link
      fedilink
      arrow-up
      23
      ·
      7 months ago

      C++ fanboys will talk a bunch of shit about Java for this, but c++ has been doing this same shit (and more poorly) pretty much since its inception.

      And most of the newer Java stuff is syntactic sugar, so I’m not sure why that commenter is calling out JVM implementations. I’m guessing they don’t know much about the JVM, since you can compile these higher level syntax tricks down into bytecode just like you might compile more verbose source code.

      Static analysis of compiled code with javap might be more difficult, but I’m betting the commenter doesn’t know what that is either.

      • nik9000@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        I think the last new instruction the JVM added was invokedynamic like 10 years ago. I believe they did it so lambdas could be called efficiently. Polymorphic incline cache and stuff.

        But the JVM has grown more complex in other ways. The way to force simd instructions is pretty wild, for example.

        I don’t know enough to call it a mess or not. It works though.

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

      Because Java sucks at taking those features. I mean look at Java’s Optional abomination of a class and compare it to C# or Typescript’s optional chaining ( ?. ) language feature.

      There’s a reason Kotlin was created, because Java is still bogged down by all its legacy kruft.

      • QuaternionsRock@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        It still boggles my mind that C# is as good as it is given where it comes from. Java really fucked up with type erasure and never fully recovered imo.