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.

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

    Different programming languages have different types of strengths. C is good for bare-metal performance and hardware interactions, Python is good at versatile interactions with all kinds of software and systems, Node.JS is good for asynchronous operations, and so on. Some esoteric languages aim to make things easy (or make them possible in the first place), or make things faster, or more secure, or etc. The things you can write in one language don’t always translate to another, and sometimes people create a new language that makes things possible that didn’t used to be possible. Machine learning wouldn’t be where it is if everyone who’s currently using Pytorch was still using C and doing all their own memory management. I’m currently working on a project in Node that would be much more difficult in Java, because Node’s approach to asynchronous operations matches this problem way better than do the primitives that Java’s runtime makes available. And so on.

    Is any given language that gets created going to be the next Python? Probably not. But everyone who makes one has some kind of idea that there’s something unique and wonderful within it, and you can’t tell if they’re right unless you let it happen and see how it plays out.

    Edit: Okay lemme clarify: Node.JS is good for a particular type of (generally I/O bound) asynchronous operations. It makes simple things easy and fast, at the cost of making some complex things pretty much impossible, so there are a bunch of problems it’s not good for. Better with the caveat maybe?

    • TempestTiger@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      If you have time (and the inclination!), would you mind explaining why Java’s primitives aren’t as good as Node visa vie Async ops?

      • Von_Broheim@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        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.