There’s a few reasons.
First the people driven ones:
1. Academics wanting to try out their latest ideas on how to make something better/newer/more suited for some new problem (or fix an old one)
2. Professionals who find problems with currently available languages and think they can come up with an imporvement/better way.
3. Hobbyists who just want to play around and enjoy it.
Note that an individual can fit into 2 or 3 of the above categories at the same time.
Then there are the need driven ones:
1. A new hardware platform that requires some kind of new language to make the most of its features (game consoles, VR, mobile device, etc.)
2. A new software model that requires a new language to make the most of its features (think generative AI, image processing, etc.)
3. Situations where very specific performance, security, etc. needs need to be met (medical devices, government systems, banking, etc.)
Again more than one of the above might apply.
Mix and match the people driven and the need driven situations and you’ve got your answer. Each language is born from some combination of circumstances.
Not only are new languages developed, existing languages go through extensive changes to optimize and add new features. People are constantly working on them. People also just do it to do it. There have been around 9,000 programming languages written. Obviously most are not in widespread use. There are things like this: [https://www.emojicode.org/](https://www.emojicode.org/)
and these: [https://www.omnesgroup.com/weirdest-programming/](https://www.omnesgroup.com/weirdest-programming/)
A high-level language compiles code into assembly language, which is an abstraction, a human readable version of machine code, which is binary numbers.
The high-level language is designed to write software using a particular paradigm, a particular way of approaching a problem. The compiler determines what you want to do by analysing your logic (functions, loops, variables, etc) and converts that to assembly, which would be incredibly tedious to write yourself. A couple of lines of a high-level language could become hundreds, maybe thousands of assembly lines.
A new language is usually designed to do something fundamentally different or streamline a problem.
A modern example would be C/C++ vs Rust. The former requires the programmers to take control of basically all memory management, allocating and deallocating memory for variables. The latter is very controlling to the point where it might feel insufferably pedantic about what you can and can’t do, but you can almost guarantee there won’t be memory related issues. Both languages solve basically the same problems, but both do it in wildly different ways.
Think of it all like a woodworker wanting to join two bits of wood together to make some furniture. Nails and hammers could work. Maybe even metal brackets and screws. You might make a series of interlocking slots and glue them together. There are many ways to achieve a similar result and each have pros, cons and a more appropriate time and place to use them.
This happened at my parents house at Christmas while I was visiting. I went to Home Depot and rented the big electric power snake and sent it down there a couple of times. I used the different snake heads (flailing blades, screwy spring, etc). What surprised me was when I pulled the screwy spring head back out and there was some root like bits and a poor earthworm tangled in the spring head. Obviously a plant root got through the pipe. I think that summer they had a pro check it out.
I like to think of programming languages as being custom-built for particular use-cases. So, if you have 1. a particular use-case, 2. it’s very common, and 3. it’s profitable – there will be a programming language that fits that use-case pretty well. Languages are not cheap and they require a large population to survive – much like a virus.
4GL languages in the 90’s were all built around the business case that you wanted to access data (typically parent-child relational data) and update it from the intranet. Order: Details, baby. C was a low-level language suited to drivers, C++ was trying to do C, but for large applications, etc. .Net is an attempt to make a *platform* upon which you can build forms (for windows), or web applications (that run on windows) without having to re-tool your knowledge of the language/frameworks.
Each language has a use-case where it shines – it was built for that purpose. General use languages (like java was meant to be) are typically <not great> at most things. The idea behind the JCP, etc. is to have plug-in frameworks to make java work for any use-case. The “devil is in the details” of the implementations for different interfaces – they’d rather not try to maintain them for all the available things a developer might need to do (which is basically infinite). They have made the “standard” and “enterprise” frameworks for java pretty extensive in all these years – and there are some really slick solutions, but the genius of java is that it’s pretty flexible, while adhering to decent engineering principles (type safety, etc.). But, no doubt, that makes it hard to learn.
As most people like to compare C# with Java by comparing the contents of their default frameworks – I don’t think that’s a fair comparison. Microsoft (Steve Ballmer made this super clear) has done a damn fine job and spent a ton of money to woo developers with a pretty great stack and best-of-breed tools, but it doesn’t do all things without plugging libs in (like java was designed). MS knows that to keep people coding for windows – there has to be a reason that developers LIKE to code for windows. MS spends way more money on .NET than Oracle does on Java.
While I’m thinking about VB, that’s another reason that new languages are made – to be easier for people who are NOT engineers to be able to pick them up. SQL, HTML, CSS, etc. these are all supposed to be non-engineer “languages” because learning how to do real engineering is something that takes 10 years+. Businesses don’t know how to build those skills. So, “programming languages for dummies” is a real use-case. Some “languages” are just attempts to keep engineers from having to do boiler plate things (like formatting a web-page).
If you were really 5, you probably wouldn’t understand much of that – sorry. 🙂 It’s not something a 5 y.o. would ask, though.
Some languages are created for the hell of it. You see all these programming languages, and you think, “Why not create my own, just for fun?”
Some languages are created with different goals. For instance, Rust is slow to write in, fast to run. Python is fast to write in, slow to run.
Some languages are interpreted (Perl), others compiled (Go), and some run inside their own virtual machine (Java).
Some are special purpose — there are several math-oriented languages for example. SQL is specifically for manipulating databases. Some remain general-use but focus on something specific, like concurrency (Go).
Some languages adopt different programming paradigms — imperative (like C), object oriented (like C++), functional (like Erlang), etc. And then there’s blends of those.
Another thing that happens is struggles with backwards compatibility. As languages get older, they may get cluttered with edge cases or weird syntax issues because once it works, they feel they can’t change it or remove it from future versions. C++ is an enormous and enormously complex language at this point — you don’t need to know it all to write C++, but you may encounter C++ code that is painful to understand of somebody uses a different subset of the language than you.
There are different driving factors that so far nobody has managed to combined well into a single language or at the very least not well enough to push away existing once entirely.
– Performance. The most obvious one maybe. This is were e.g. C, C++ traditionally excel.
– Development speed. Abstracting away lower level details and providing ample built-in utility code significantly speeds up development. Among the things commonly abstracted away are things like memory layout and memory management, but also some aspects of error handling.
– Maintainability. Needing less code to get the same thing done, describing more the “what” and less the details of the “how”. Also, new languages can restrict the “how” to eliminate certain classes of bugs.
– Maintainability and development speed are tightly connected. Also, they favor the creation of domain specific languages.
– Portability. Some languages may be bad at running across multiple platforms by leaving platform dependent details to the programmer. While this could be mostly solved by providing platform agnostic libraries it pretty much had to be present when the language is first gaining wider adoption. Otherwise you’ll end up in a situation, where the language has become more portable, but the libraries you want to use are not.
The languages that succeed at providing significant value for l
Beyond that, there can also be legal reasons, such as a language coming with a usage contract that makes it non-viable for your usecase.
There can also be political reasons like “we want to be legally and technologically in control of the language driving our platform”.
For research purposes (i.e. in order to find new ways of improving on such criteria) small languages may be created even without an intent of them ever gaining widespread use.
And then there are esoteric languages, which are essentially practical jokes.
Latest Answers