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.

  • @[email protected]
    link
    fedilink
    72 years ago

    A given programming language often has limitations which are largely different than the limitations from others. This means that different languages are often used on different kinds of problems. Want something fast, use C. Want to write something quickly, use python. Want it to run on just about anything, use Java. And so on.

    So why don’t we make one ultimate one or a few that fulfill all needs? Well, partially because we haven’t figured out how to do that, but also it’s really easy to learn yet another language once your understand how they work. I can write in python, js, c, c++, c#, Java, kotlin, rust, perl, ruby, php, forth, lisp, and I could keep on going for quite a while. The underlying concepts are largely the same and so picking up a new language is no big deal (though being good at it is a bigger deal). We have so many because ultimately it just doesn’t really matter that we have so many.

  • @[email protected]
    link
    fedilink
    122 years ago

    I know a handful of languages and I think of them as tools. For example, a flathead screwdriver will work on a phillips screw head (In most cases with some outliers), but a phillips screwdriver might just be better for the job. Same with a wrench and a socket with a ratchet, etc.

    When it comes to programming or scripting I approach it in the same way. If I am at work, and I need to automate something quick and dirty, no end user will need to use it, and it is just adjusting data or spitting data back at me, I am probably going to write it in Python.

    Or, if I need to make something that an end user is going to interact with, I am probably going to spin up a web server and use the MERN stack to create that.

    If I am working at home on a TUI for my favorite application, I am going to use Rust or Python

    And if I working on a project that requires me to work with embedded systems, I am probably going to reach for C, maybe C++ depending on the support, and I have in a couple of instances needed to use Assembly.

    All this to say, I think that if I had to use Python for all of these, I would be in trouble. Same as if I had to use C++ to accomplish all of the above. Could it be done? Sure. Do I want to do that? Not at all.

  • @[email protected]
    link
    fedilink
    English
    52 years ago

    Without new programming languages we would still be using FORTRAN, AGOL and LISP.

    https://fortran-lang.org/learn/quickstart/hello_world/

    https://lisp-lang.org/learn/first-steps

    https://www.computer.org/publications/tech-news/insider-membership-news/timeline-of-programming-languages

    One reason why new languages are developed is the creation of a “Domain-specific language” or DSL. See Wikipedia for more information.

    Programming languages are tools you pick the one for the job, there are situations where Java’s garbage collection could be a problem so it would not the right tool to use.

  • @[email protected]
    link
    fedilink
    62 years ago

    There are a lot of people with a lot of opinions and preferences that are trying to do a lot of different things in a lot different ways. The same reason we have so many of anything.

    • Freeman
      link
      fedilink
      English
      142 years ago

      What kind of screwdriver though? Torx are superior.

        • Freeman
          link
          fedilink
          English
          62 years ago

          No doubt they are probably better overall, especially when considering manufacturing. But I swear parts of my house where built with scraps (or the last guy was just a sociopath) and most of the time I encounter them it’s in some rare ass instance and it just pisses me off.

          Last time was when servicing my AC I noticed the breaker was bad (ie wouldn’t reset ). So I had to swap it and by code I needed to swap the box it ran on since it was showing signs. Sure enough 1 of 4 screws holding it to the side of the house is a fuckin Robertson head. So I was neck deep in fixing shit and had to stop and go find my random cup of bit heads out in the shop.

          Now I just carry a bit if I can remember it. But it’s hard to find screws sometimes so I just don’t use it to avoid exacerbating my own problems.

    • @[email protected]
      link
      fedilink
      22 years ago

      In a lot of cases it feels a lot more like my mother in law buying me a new multi-tool every Christmas

  • Dr. Wesker
    link
    fedilink
    English
    302 years ago

    Long has man wanted to experiment with as many partners as he can.

  • @[email protected]
    cake
    link
    fedilink
    English
    572 years ago

    Some languages have a obligation to support older versions, provide upgrade guides. They have old baggage in the forms of old systems or processes that they can’t just abandon.

    Sometimes it’s easier to just start over from a clean slate. Experimenting and seeing how it works. If it fails well you haven’t inconvenienced millions of users.

    It’s all about experimenting, trying to see what works, what it’s good with and what it’s not good with. A language like Java can’t just change to experiment things. Some people are also fixed to the style and methodology that Java provides.

    Aside from that, hobby languages are just hobbyist stuff.

    • stephenc
      link
      fedilink
      English
      92 years ago

      Quite a few languages that are major players now started as hobby languages.

  • @[email protected]
    link
    fedilink
    English
    52
    edit-2
    2 years 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.

    • @[email protected]
      link
      fedilink
      52 years ago

      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.

      Hang on a minute. Isn’t that literally just Rust CrabLang?

      • @[email protected]
        link
        fedilink
        52 years ago

        Rust still lacks OOP (the inheritance/subtyping part of it) though. And some more advanced Haskell features too, like HKT.

        • @[email protected]
          link
          fedilink
          32 years ago

          I’ll take your word for it about the missing Haskell features, but with regards to inheritance, they deliberate chose to avoid it. They use an alternative model to achieve the same goals inheritance is meant for, but without the issues that come along with it. Their approach is basically a more advanced version of how Go uses interfaces to define shared behaviour.

            • @[email protected]
              link
              fedilink
              42 years ago

              It is pretty neat. They’ve made a lot of really interesting design decisions that make for a pretty unique language.

              One of its main selling points is how it guarantees memory safety without using a garbage collector. That, plus the fact that it does a shit-ton of compile-time optimizations, actually makes it pretty fast. Like, 80%-90% as fast as C (which is much faster than all the other high-level languages like Java, Go, etc, partly because they do in fact use garbage collectors).

              If you want to check it out, I recommend this playlist as a solid intro.

          • @[email protected]
            link
            fedilink
            22 years ago

            Oh yeah, I get all of those, because I am a Rust programmer myself who hates OOP. :D

            I raised the topic up only because of how people were talking about “the ultimate language with everything”.

    • stephenc
      link
      fedilink
      English
      9
      edit-2
      2 years ago

      I’d call it Paradox Lang, or PL for short. It even has features that are contradictory to each other, you just have to declare which mode you want at the top of every file. Can you imagine. :)

      The only feature it doesn’t have is “lightweight and minimal language”.

    • @[email protected]
      link
      fedilink
      English
      142 years ago

      easily improve … C++

      I assure you that there is absolutely nothing easy about the C++ standardization process, lol.

    • @[email protected]
      link
      fedilink
      9
      edit-2
      2 years ago

      Such an abomination could be created. Just imagine all the over engineering that would be required.

      It would run ANYTHING on ANY platform by incorporating every libc and assembler and VM and dynamic interpreter.

      It runs on EVERY platform and thus it can be adequately tested on NO platform.

        • @[email protected]
          link
          fedilink
          12 years ago

          There are no stable releases, just a continual rolling build from the single bespoke server farm that can create releases

  • @[email protected]
    link
    fedilink
    62 years ago

    There is a time when you are solving/coding for a specific domain and you quickly start metaprogramming (coding a code generator). That’s the moment when you write your own Domain Specific Language. They have a tendency to grow and evolve. In time some of them become full blown programming languages themselves.

    My suggestion, learn a few from different paradigms. They are more than eye opening.

    • @[email protected]
      link
      fedilink
      English
      42 years ago

      If there was a single language, afterwards the same broken logic would be applied to frameworks and libraries, and we all know how many people bitch and whine over Java and it’s extensive standard library.

    • @[email protected]
      link
      fedilink
      132 years 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.

    • @[email protected]
      link
      fedilink
      English
      212 years ago

      You got to it before I did. Programming languages are like vehicles. You wouldn’t take a sports car off-roading, and you wouldn’t expect a tractor to win a drag race. There is a lot you can do with an all-purpose vehicle, but it’s not going to be as good as something that is purpose-built for a single task.

  • @[email protected]
    link
    fedilink
    102 years ago

    let hem keep at it. I haven’t found an easy and verstile language as Python than can compile to byte code and be as fast a C ! I know it is coming anytime now despite having been waiting for over a decade.

    • cacheson
      link
      fedilink
      62 years ago

      I won’t claim it’s as easy as Python, but that’s the rough area that Nim is aiming for. Going from dynamically typed to statically typed is always going to be kind of painful, but I’ve liked the language overall.

      Also, we have a Nim community here, if anyone is interested: https://programming.dev/c/nim

  • @[email protected]
    cake
    link
    fedilink
    English
    22 years ago

    The same reason anyone creates a new product in an existing market - they want money.

    • @[email protected]
      link
      fedilink
      English
      32 years ago

      For which language do you have to pay the language inventor to use it?

      • That sentence may be grammatically … questionable …, but I don’t know how to write that correctly now.
      • 8bitguy
        link
        fedilink
        2
        edit-2
        2 years ago

        Coldfusion (Adobe) comes to mind. There is an open source CFML version or two, but the real deal is a bit pricey. It’s mostly used by government, higher ed., and healthcare. It’s not terrible, but it was cooler when it was younger IMO.

      • @[email protected]
        cake
        link
        fedilink
        12 years ago

        If you invent a language and it takes off, you’re literally the expert on it and will reap the financial windfall of that.

      • @[email protected]
        link
        fedilink
        English
        12 years ago

        That sentence seems correct. As for your question, you’d rather have to ask yourself: When would you pay for a programming language?

        Back in the old days before internet and commodity hardware, before easy distribution, before non-trivial software, before basic compiler knowledge was common people were easily impressed, so naturally you could sell your compiler for primitive grug BASIC.

        Today, that situation is different. A language by itself is meaningless, a risk, even, in some ways. A while back some developer of REM Objects was bitching about in the old aggregator on how nobody wanted to spend money on their special proprietary BASIC. Like it was just another product. They don’t know how to use a computer how programming languages work. This extends to even finding users willing to use your stuff for free. I don’t want to knock on REM Objects in particular, you know you could add way more examples like Seed7, every lisper ever etc., but let’s get into why people pay for programming languages.

        • extreme vendor lock-in of platform, hardware, whatever (but you almost always have your language bundled with something else in the first place, because…)
        • the point is a feature beyond the language (think matlab, labview, SAP, Excel or Coldfusion 8bitguy mentioned)
        • dubious support contracts (think Oracle JDK)
        • enthusiasts you can milk for life support and dumbfucks that fall for your next gen graph AI DSL whatever bla
        • extremely great developer experience (but we live in an age where megacorps create languages and infrastructure for improved experience for free, so, good luck with that these days)
    • SuperFola
      link
      fedilink
      English
      12 years ago

      I’ll bite the bullet: I’m making my own scripting language for fun, as a learning experience and a tool for my own projects. If it can help others, great! But that’s not my main goal.

      In nearly 5 years working on it, I’ve made at most 400$ from donations and grants. Open source isn’t a viable source of income, no matter what ; and programming language dev is even less profitable.