For the same reason every engineer looks at legacy code and says “this is too complicated! I’m throwing this out and starting over” only to find out the hard way that the “complication” was a decade worth of requirements.
Hubris.
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!
For the same reason every engineer looks at legacy code and says “this is too complicated! I’m throwing this out and starting over” only to find out the hard way that the “complication” was a decade worth of requirements.
Hubris.
There have been genuine advancements in language design in the last three decades. The existing languages aren't suddenly outdated and useless, no, but it's just as wrong to say there is no room for growth and improvement.
Besides, nobody is throwing away legacy code and starting over, at least when it comes to language development. The language teams are new groups working on new projects.
We also see that the 'legacy' languages are taking lessons from the new ones. Java is implementing features first seen in Kotlin. C++ is getting classes inspired by Rust. The users of these existing languages are benefiting by the development efforts of these new languages, without ever having to even use them.
One day they will back their way into reinventing Lisp and the prophesy will be fulfilled.
The best way to understand this is... to learn a new language. C and Python are language with some of the worst tooling out there. C was simply created before languages had decent tooling and the foundation responsible for standardizing Python is doing a terrible job. Just having quality tools to work with a language makes a big difference.
On top of that people keep coming up with better ideas to do things. Sometimes it's possible to add those ideas into older languages and sometimes it's not. Java was able to add algebraic types but it will never get rid of null values. Even when you can add new features they are always something optional. Creating a new language lets you take the best ideas out there and use them as a base for the entire language. Having strong base makes the whole language better.
Golang is 16 years old and rust is 14 years old.
Why do people use them? Why do developers prefer C or Python? Because they like them.
Go has a good niche of native + performance for systems programming. It’s still more abstract than C, but much less than Python. It’s a good middle ground. It’s not JIT like C# or Java.
Rust is just as fast as C, allows lower level programming that you could do with C. Rusts big advantage is that its memory safe (unless you use unsafe). That eliminates a very common C bug.
Rusts big advantage is that its memory safe
Most languages are memory safe. It's only really C, C++ and zig that are not (at least for more mainstream languages). Rust is special as it is memory safe without a garbage collector. Which is big for domains where the overhead of a GC is unacceptable.
Most languages are memory safe.
Most languages are not as fast as C.
Swift is also memory safe without a GC, by the way! It uses reference counting instead.
-- Frost
Trying to stop software engineers from inventing new programming languages is like trying to stop college students from having sex. You're better off spending the effort on promoting safety¹ rather than abstinence.
¹ type-safety, memory-safety, etc.
Thanks to your comparison, I can now totally relate!
*am software engineer
Making a new programming language is like inventing a new musical instrument.
It represents the creator's vision of what good music is and how easily and well it produces these sounds.
So can we expect some dude whose gradually going blind to be the programmer equivalent of Mozart to write the single greatest script soon?
yea I imagine some Haskell genius already wrote the greatest script in the world. But they are not famous because only a few shy programmers can understand it.
I like this metaphor for this.
Ah, I like this comparison - something I can relate to. I mostly listen to either European Pre-Renaissance or world music/folk jazz these days. What would that be in programming languages?
It's probably C that's closest in the programming language world. It's old, stood the test of time and is still popular.
C, in some ways, is probably like a Xylophone because I always “get assembly” when I think it, and I know bits are the drum line and the CPU is the drummer.
I don't think there are more languages being created now than before. There are tons of languages that have been created over the years, but you get the survivors bias effect where the ones that are actually useful in some context start being used in that context, and the ones that are less useful stop being used.
When you were learning python was already established, but I remember having long discussions trying to convince people to use it instead of Java because it was a much higher level with much better in many aspects at some cost performance, and if you're not willing to pay that cost you should revert to C++ which is much better than Java anyways.
And that's sort of what's happening here. C++ is good for things that need to be fast, but it requires careful consideration to avoid several issues, if you don't need the speed, python gives you a much better experience in several aspects. For other specific things there are specific languages that fit better, if you're developing for web JS is already in most browsers so that's an easy choice, and if you want to make a game maybe you learn C# to use in Unity. But for general stuff C++ and Python have been the de facto standards as they cover most use cases very comfortably, so there hasn't been any real competition for them.
Enter Rust, Go, Zig, etc. Even if something is a standard it doesn't mean it's the best thing, Assembly, Cobol, Fortran, C have all been standards, but C++ can do 99% of what those other languages did and makes things easier, so slowly it became the default language. Of those "new" languages the only one I know enough is Rust, so let's talk about what Rust brings to the table that's not available on C++ or python, and why people are so excited for it.
Rust is fast, we're talking C level fast, this means that Rust beats almost every other language (including C++). Rust is safe, it's purposefully designed not to allow you to miss use it accidentally, this includes memory safety which is the most talked about, but it's a whole thing in Rust, with enums you need to match all cases, result types that includes error responses, and optional objects that force you to acknowledge the None. Rust has a great package support, better than python because it's standardized. Besides all that Rust is able to be used almost everywhere, whereas C/C++ does work in many places, but libraries for it don't.
So, why new languages? Because there are things to improve.
Just wanted to add, the reason JavaScript is on the web is because it's designed to keep running, no matter what errors occur. This is the opposite of what's desired from most languages, but the reason it's a priority for JS is because the web page HAS to work.
This is the reason for a lot of JS's quirky behavior, such as type coercion. In most cases, 1 + 'cat' should absolutely produce a terminating error. But, you don't want someone visiting your site to have the page crash, so it's preferable to return bad data than to terminate entirely, so you get '1cat' as your output.
Interesting, had never considered that, it does make sense. Although that created the absolute clusterfuck that is JS where [ ] + [ ] is "" and { } + { } is NaN. Thanks for remind me of https://www.destroyallsoftware.com/talks/wat hadn't watched that in a while.

This is basically why we have so many competing everythings.
People fogured out that there are better ways to abstract problems than what we thought 50 years ago. Hardware also has changed, now favouring a lot more concurrent programming on multiple threads, rather than efficient sequential execution.
In some cases languages have evolved but keep back compatibility, like C++, where you can use modern features like template genericity, metaprogramming, introspection, coroutines but still do OOP with virtual functions like in the early 2000s or pointer juggling and manual allocation like C.
This comes at a great cost of complexity, so people figured that limiting the scope of languages to only modern stuff frees up cognitive space and kept on adding languages.
Since software development is still a young science all this is still being figured out, so there are a LOT of new languages every year.
Each time I show up to post the relevant XKCD it's already here. Truly an efficient service
...is there an XKCD for that?
A novice asked Java master Banzen, “What is the most perfect programming language?”
The master answered, “The one which accomplishes the desired task with the least effort expended by the user.”
The novice asked, “Is there a language which exceeds all others in this regard?”
The master answered, “Build me a garden of ten thousand stones!”
--From The Codeless Code
A thin, bedraggled stranger came to the Temple one night and asked for master Kaimu. The master was roused and brought to the gate, whereupon the stranger said:
“For years I have wandered this pitiless land, seeking the perfect programming language. Name any one and I’ve given it a go, be it fast or slow, high-level or low, from Ada to Zeno. But whatever the pluses there are minuses too, so I pack my things and hit the road again—which in this case led me to your door.”
Kaimu asked the stranger to describe the language of his heart’s desire.
“It must be suitable enterprise-wide,” the stranger replied, “client-side and server-side, in scripting, in shells and in spreadsheet cells. I need it real-time, multi-threaded and optionally object-oriented; with garbage collection, deadlock detection, custom exceptions, auto-resizing arrays of things and regular expressions for matching strings. I want the simplicity of BASIC, the purity of Smalltalk, the brevity of Haskell, the speed of C, the consistency of Lisp, the readability of Python, the flexibility of Perl, and the portability of... Java, I guess, but with native code bindings that aren’t a mess.”
“Then tomorrow morning we shall assist you as best we can,” said Kaimu. “But tonight you must spend in the carpenter’s shed below the south wall.”
The stranger bowed and departed to make his bed amid sawdust and wood shavings. As Kaimu left for his own chambers a monk asked, “What is your design for him?”
“When dawn breaks,” replied the master, “our guest will see that on the walls of that shed are arrayed ten thousand tools, each crafted to serve a unique purpose. No one would mistake the hammer for the chisel, and no true carpenter would renounce one for the other.”
At the sun’s first light the stranger returned to the Temple gate, there to be greeted again by Kaimu and the monk.
“Do you still seek your heart’s desire?” asked Kaimu.
“No!” replied the stranger. “For in the shed I found a most marvelous dagger, no larger than my hand, whose hilt opened to reveal the most wonderous things: tweezers and toothpicks, pliers and drill-bits, wrenches and reamers and rulers and tiny blades too numerous to count! Holding it I understood that my destiny is to fashion the thing I have sought for—a language made of other languages, a tool to end the need for other tools!”
And with that the stranger bowed and departed.
The monk turned to Kaimu, whose jaw had gone somewhat slack. “What do the annals say on the subject of the Misunderstood Lesson?”
“That it too brings wisdom,” said the master, “If only to the hapless teacher. No doubt I would have been twice as effective had I been half as clever.”
“And what of the stranger?” asked the monk. “Surely he will fail in his endeavor, for that knife he prizes holds neither hammer nor chisel. And should he partly succeed then all the worse, for he will have added yet another language to a world that already drowns in confusion.”
“Let him try, and good fortune to him!” said Kaimu. “If not for fools of his fashion, we would not have Perl or Python, Bourne shell or Tcl, and the world would be a poorer place. I only grieve that you and I are not such fools, for since we will never attempt the impossible, we can never hope to achieve it.”
Thus master and monk left the gate, and went in to the Temple together to greet the morning.
--ibid
A lot of the time, a new language is created to make one particularly difficult thing easy.
For Go, that one thing was concurrency. You CAN do concurrency in C or Python or whatever, but it's not really built into the language. It's hard to do right and easy to do dangerously wrong.
For Rust, that one thing was memory safety. C leaves it all up to you, so it's very easy to make mistakes that lead to memory leaks, crashes, or security vulnerabilities.
If you program in any language for a significant amount of time, you're bound to find a few things that you do a million times that you wish were easier to do right and harder to do wrong. Some people see those problems and say "I can make something better".
But if a language makes a particular thing easy, it also forces you to adopt a certain premise and accept the way the language solves that particular problem. This also limits you.
Every new language wants you to accept a new premise.
I've got a friend who rewrote parts of the C++ standard lib to optimize it for his purposes. I guess an STL isn't the same as a language, but my friend's efforts is maybe a small version of people recreating a new language to solve a problem.
Nerds always looking to optimize edge cases.
As others have mentioned Go and rust are nearly old enough to drink.
And the answer is pretty simple, if an existing language does something differently to how a group of people wants to work, someone will eventually write a language to do it that way.
There's no single way to solve a problem, and that's a good thing. If someone wants to whip something up quickly there's a host of high level languages to do that in, it just probably won't be especially quick. If you really care about performance, there are low level languages with varying levels of safety measures. Then there's the whole code style thing, you might be a functional programming monk who is truly at home in APL, others may still long for something a bit more LISPy.
stuff that used to work fine in whatever old language it was in is now rewritten in a new language.
This is an illusion. If a project is moving from one language to another, that's not a lightly taken decision, and almost definitely means they've had it with all the issues brought by the first language. I'm assuming you're referring to the movement from C/C++ code to Rust that I've seen a fair bit.
This one particularly is because in C-like languages, any engineer will make mistakes, and those mistakes may never be obvious enough to be fixed. These kinds of mistakes are what cause those random crashes that never get fixed, but more severely, they often also give an opening for a security researcher (or someone more nefarious) to exploit. No one typically wants their software to be used for making people's lives worse, so a lot of effort will be put into trying to catch those issues early, and manage the situation when one isn't. With the advent of AI many projects have seen an exponential increase in the number of security issues they're dealing with.
Or, they could bite the bullet and move to something like rust which keeps the performance benefits, but removes the ability to even make the mistakes in the first place.
All programming languages suck in their own way. Naturally people want to create languages that suck a bit less for their particular problem.
Go was created because compile times in C++ are ridiculously long. Rust was created to prevent common memory bugs without sacrificing runtime performance.
C and Python are still widely popular. It’s rare these days that a new language completely displaces an old one, so don’t worry about being left behind by learning an ”old” language.
Other popular languages are C++, Java, C# and JavaScript.
Keep in mind that software engineering as a field is like, incredibly new, compared to a lot of other fields. Computers have not been around for that long, historically speaking.
It's honestly to be expected that some of the first established languages did not turn out to be the best language that could be. We're still figuring out how programming languages should be.
In 50 years, there will probably be another series of programming languages. They might even be optimised for LLM usage rather than for human directly, who knows. This stuff is all so new.
its like this.
is there only one tool in your toolbox? no? why not? cuz you need the right tool for the right job, obv
thats why there are lots of languages. new languages are tools for jobs.
the 'jobs' change over time and so do their requirements... the languages are just evolving to match our required workflows
Yes, evolution. The best measure of fitness in any system is diversity. So many languages may be unwieldly for any one person but they're more fit as a whole system.
And now suddenly it seems that a host of new programming languages have appeared
That's your perception of course, but I think new programming languages have always been appearing. The thing is that the old ones do not necessarily disappear, so there's a cumulative effect.
I was looking for a graphical representation, but this wikipedia article shows it better imho. I didn't count, but it doesn't look to me like the last 2 decades are overpopulated.
Starts with the Jaquard loom, I already love it, thanks for sharing!
Take a look at LISP, Prolog and Erlang you'll be able to answer the question yourself. Just a little tutorial for each of them. You'll notice they have very different but fascinating ideas about how things could or should be done.
Maybe after a while you'll get thoughts like "I wish language A had this feature of language B" and that's kind of how new languages appear. Because it's often not possible to add such features or concepts to established "old" languages without breaking everything or losing backwards compatibility.
It's really hard to give a less-than-book-length answer without simplifying a LOT, but I'll do my best to be as accurate and comprehensive as I can while still offering a somewhat brief answer.
What you're ultimately getting at is a concept called "abstraction," which basically means "letting the language worry about it instead of the programmer."
A computer operates using ones and zeroes, also called "binary". These patterns of ones and zeroes are interpreted as either data or instructions depending on which processor register they're sent to. Representing data this way is inefficient and difficult to read for humans. For single-digit numbers, it's fine, but for sentences, paragraphs, entire programs, representing them in binary takes up a lot of space, so we "abstract" binary by representing it as hex code (base 16, zero through 'F'). This allows us to show the same data in a more condensed way. This is only one kind of very simple abstraction.
Modern programming languages aim to abstract as much of the coding process as possible. Languages like Assembly that abstract very little are considered "close to the metal" because the programmer needs to do EVERYTHING manually. The benefit to this is that it's very efficient; the program only does what it absolutely needs to do. The tradeoff is that it takes a LOT of extra time to do everything manually, the margin for error is very slim, and you're pretty much on your own if things go wrong. Another downside is that, since everything is manual, Assembly needs to be written for the specific processor architecture you're using.
C is only slightly further from the metal than Assembly, so it's still very efficient, but misuse is very easy to do, especially by accident. The main benefit is that C code can be compiled. Compilation is a process that does many things, but one thing it can do is take C code and turn it into Assembly instructions that can be interpreted by a specific processor. So, you can write the program once, then compile it to x86, ARM, Mac, whatever. With Assembly, you would need to write a different version of the program for each architecture it would need to be compatible with. Doom was developed in C, which has a lot to do with the "but will it run Doom?" meme.
From there, different languages abstract different aspects to different degrees to make them more specialized to certain tasks.
C++ adds object-oriented functionality to C, slightly impacting performance, but making classes and inheritance possible without hacking memory pointers to behave the same way. C++ is typically used when high-performance is desired, but the code base is still very large. Thr Source engine, and thus, Source engine games like TF2, are written in C++.
Python and other languages sufficiently far from the metal have the benefit of being interpreted, which means the code you write is executed in real-time. This means syntax errors and such can be identified in real-time by your IDE. With C and other compiled languages, you have to wait until you compile your code to find errors. This makes Python ideal for developing many, simple programs where performance isn't a (big) consideration.
C# and Java are interpreted, but also run inside special runtime environments, which makes them compatible with just about any hardware, but is very resource intensive. Unity engine games like Rust were developed in C#; Minecraft was developed in Java.
Haxe can be cross-piled to C code that can then be compiled to Assembly, allowing developers to write one program compatible with all gaming consoles (Dead Cells, for example) without the performance impact associated with languages like Java.
J and Lua are specialized to complex mathematics and simulations. Lua is the language used to create Beam.NG:Drive and Project Zomboid.
Why do new languages come into creation?
Because someone with the understanding and education to write a new language decided the ones they know aren't cutting it
Paintings are pigment expressed upon a medium. Code is thought expressed through a medium
People create new paints all the time
Uh, sometimes people just feel like “I could do it better” so they make a language or they’re in a CSci course that focused on writing a compiler/interpretter and so it started as coursework and just grew.
But yeah, others have mentioned that languages often come about because doing a thing in that language could’ve been done better so another took form.
Languages have always been popping up. I’m guessing since you didn’t spend that much time in the community the first time you were learning programming you just hadn’t noticed. In any case it’s like any product on the market. People refine them and make and sell new ones.
The interop languages (things that compile to C/C++/JS) can break the typical dilemma of inefficient-but-easy (interpreted) vs. difficult-but-fast (compiled, required low-level). Difference being lots of syntax options (Syntactic sugar, UFCS) and the compiler able to handle low-level stuff combined with leaning on a library (be it the standard library, Godot/Raylib bindings, or some fantasy console like WASM-4) it can look/feel like scripting, aside from handling types which is a safety/performance thing anyhow.
At least that is my experience with Nim-lang, which makes much more sense to me than other newer languages (particularly ones with a higher learning curve). Some of that might just be preference though, like how Zig has C-like syntax and Nim uses whitespace.
A specific example of flexibility, Nim has a subset called nimscript that can be used for interpreted code. This is what's used for a Godot project called Enu that has in-game scripting (simple DSL, hot-code reloading) for block placement, entity behavior, and color usage.
Nice to see nim mentioned. Quite like it as in principle but I thought it was on life support.