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.
you would think there would be some kind of universal language
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.
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.
Why invent the screwdriver if you have a hammer
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.
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.
Quite a few languages that are major players now started as hobby languages.
I think PHP has a bad rep 'cos it tried to be everything to everyone… if you maintain a certain standard (i.e. always do the same thing the same way) and avoid deviating it’s actually a pretty cool language.
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.
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.
Also, by the time you’ve gotten it to compile, another two versions have come out.
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?
Rust still lacks OOP (the inheritance/subtyping part of it) though. And some more advanced Haskell features too, like HKT.
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.