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.

    • jeffhykin@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      JavaScript (is the universal language) (is also the answer of why there are so many languages)

    • Zalack@startrek.website
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I actually don’t think that’s the case for languages. Most languages start out from a desire to do some specific thing better than other languages rather than do everything.

  • glad_cat@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    You can’t easily improve a language and stay compatible with the previous versions. C++ does it but they are crazy.

    you would think there would be some kind of universal language

    It does not exist, but anyone is free to try and invent it. It should be low-level like assembly and high-level like BASIC, functional, object-oriented, and have weird stuff like traits, concepts, and alien features from Haskell. It must also have both the pointers/references of C++, and the borrow checker of Rust. And don’t forget to make it as secure as Ada with pre and post conditions. But it must still be easy to use. Also you will have to write a compiler for every operating system ever (mainframe, server, desktop, iOS, Android, every phone, every tablet), and contain a universal GUI that pleases everyone. It’s literally impossible to do right now.

    Last but not least, Java was supposed to be this universal language that you can run everywhere. It failed and it cannot be run everywhere. It also had to be improved a lot, and it’s missing a fuckton of features from every other language.

  • noodle@feddit.uk
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    New languages deal with challenges the old languages faced differently, with hindsight of how those languages dealt with those challenges and how they could have done things better.

    We don’t even have a universal language for communication. That may not be a bad thing, either. There’s a theory that the language you speak changes the way you perceive the world - I believe that’s true with programming as well. If we only had Java, we’d only get Java-style solutions.

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

    You can not perfect old languages, since there are a lot of features that you can not add on or change afterwards, OP. Not in a worthwile way. This is not a philosophical question, it wasn’t for a lack of trying. And since there aren’t enough skilled people in this niche, fashion driven field, expect history to repeat itself and some langs at best get 60 to 80% right.

    • Hector_McG@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      1 year ago

      You cannot perfect old languages. And you cannot write a new language without making architectural errors. And any new language that deviates significantly from what has gone before will only ever see niche success.

      Thus what we have today is the best we can expect: gradual evolution of new languages, and gradual improvement of old languages. Neither has any particular advantage, but the industry as a whole keeps grasping at the eternal straw of the ‘silver bullet’ language that new languages promise.

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

    There can be a universal language in theory, but it’s borderline impossible to achieve. Every domain has a different set of problems that it needs to solve, and language design involves tradeoffs that may make sense for one domain but not another. That’s why I think language wars are silly, without context it’s impossible to say which language is “better”, because you could have different answers depending on what you’re trying to do.

    In the end you shouldn’t be too concerned with it. There are lots of languages, but all of them fall under two or three paradigms where if you learn one language from that paradigm, your skills are mostly transferable.

    • demesisx@infosec.pub
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      It has been achieved by many different projects: The K framework is probably the closest to a universal language.

      There’s also the possibility of formally defining code as an Agda spec which also allows that code to be converted to any other language without adding new bugs.

      Then, you have category theory which is literally a universal language that describes ALL processes in a program.

      Then you also have lambda calculus which does the same thing.

      • gnus_migrate@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I mean if youre going to think of it that way any Turing complete language fits the bill, but what I mean by universal is a language you would reach for to solve any problem you have and it would be better than any other language. It’s not a computer science problem it’s a software engineering problem.

  • beeng@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Like human languages, you get different types of expressiveness in different ways. If you know multiple languages whether is python or Java, or English and French / Spanish / German, you’ll see that there are positives and negatives to each language.

    Lots of people want to design the best combination of them all, using the newest tools and newest tech to create something as useful as possible.

  • Hector_McG@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    Partly because sometimes a particular language suits a particular problem set.

    Partly because people just like writing computer languages.

    But mostly because people mistake the fundamental problem of programming, which is programming is really hard. So someone comes along and thinks “Programming is really hard, it must be a problem with the languages available” and sets out to write a computer language that makes programming easy.

    But all that happens is they trade one set of difficulties for another set of difficulties. They might succeed in making writing the initial version easier, but make maintaining that code harder. Or they might solve some memory allocation problems, but create performance issues.

    Either way, someone will write a language because they think they will help solve the issue of programming being hard, and fail. Because the really hard bit about programming is about understanding everything the program needs to do, in microscopic detail, and translating that into a structure that best fits the problem; not the actual coding itself.