Why are there so many programming languages? And why are there still being so many made? I would think you would try to perfect what you have instead of making new ones all the time. I understand you need new languages sometimes like quantumcomputing or some newer tech like that. But for pc you would think there would be some kind of universal language. I’m learning java btw. I like programming languages. But was just wondering.

  • Von_Broheim
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    1 year ago

    There isn’t one, java is excellent for async and multithreading and it does it properly unlike node that fakes it by running on a single clever event loop or stealthily launches a bunch of node instances in the background depending on implementation.

    • mo_ztt ✅@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I talked up above about my feelings on it – I did Java and J2EE programming for years back in the day, so I’m well familiar with Java and its very real strengths and very real weaknesses. There’s good and bad to the many-threads-in-a-process approach, and to the one-process-per-task approach, and to the one-thread-with-async approach. If what you’re looking for is many-threads-in-a-process, then yes, Java does it right. But if you’re looking for something else, maybe it’s going to be wrong. It just depends.

      Also can you explain a little more about the implementation that stealthily launches a bunch of node instances in the background?

    • TempestTiger
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      My bad, I was mostly curious about how it matched OP’s project better and why.

      When you say it does it properly, do you mean actually creating proper threads or something else?