• pulaskiwasright@lemmy.ml
    link
    fedilink
    English
    arrow-up
    72
    arrow-down
    2
    ·
    8 months ago

    My favorite is “Java is slow” said by someone advocating for a language that’s at least 10 times slower.

    • kaffiene@lemmy.world
      link
      fedilink
      English
      arrow-up
      26
      arrow-down
      1
      ·
      8 months ago

      My favourite is “all the boilerplate” then they come up with go’s error checking where you repeat the same three lines after every function call so that 60% of your code is the same lines orlf error checking over and over

      • pulaskiwasright@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 months ago

        And god help you if you forget those 3 lines somewhere and you silently have database failures or something else.

        • kaffiene@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 months ago

          Yeah, that’s the other thing - it does become easier to accidentally fail to deal with errors and the go adherents say they do all of that verbose BS to make error handling more robust. I actually like go, but there’s so much BS with ignoring the pain points in the language.

      • xtapa@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        8 months ago

        When you handle all your errs the same way, I’d say you’re doing something wrong. You can build some pretty strong err trace wrapping errs. I also think it’s more readable than the average try catch block.

        • kaffiene@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          8 months ago

          You still need to add error handling to every call to every function that might raise an error

      • SorryQuick@lemmy.ca
        link
        fedilink
        arrow-up
        6
        arrow-down
        10
        ·
        edit-2
        8 months ago

        How are they ignorant? It’s a known fact that java is slow, at least slower than some others. Sure, it’s still fast enough for 95% of use cases, but most code will run faster if written in, say, C. Will have 10x the amount of code and twice as many bugs though.

          • SorryQuick@lemmy.ca
            link
            fedilink
            arrow-up
            4
            arrow-down
            4
            ·
            8 months ago

            Which is exaxtly what I said, that it’s fast enough for most use cases.

            In theory though, you will “gain performance” by rewriting it (well) in C for literally anything. Even if it’s disk/io, the actual time spent in your code will be lower, while the time spent in kernel mode will be just as long.

            For example, you are running a server which reads files and returns data based on said files. The act of reading the file won’t be much faster, but if written in C, your parsers and actual logic behind what to do with the file will be.

            But it’s as you said, this actual tiny performance gain isn’t worth it over development/resource cost most of the time.

        • xor@infosec.pub
          link
          fedilink
          arrow-up
          1
          arrow-down
          9
          ·
          8 months ago

          the jvm brings enough bugs to outweigh any benefits there…
          it is relatively fast, but it’s slow in that it takes up a bunch of resources that could be doing other things…