r/eli5_programming • u/Small-Dig-8233 • 20h ago
Question why are there so many different programming languages? like some are clear like rust and C++ because C++ had memory "issues" which rust fixed but why others like C#, Zlang, F#, etc
5
Upvotes
8
u/reklamationer 20h ago
https://xkcd.com/927/
4
u/Revenege 20h ago
Other poster beat me to it with the XKCD comic, which is entirely correct.
Every language is good at different things, just like spoken languages are. When a developer is making a language, its to solve a problem they feel that current options dont provide. This could be as you note attempting to solve problems with memory safety or attempt to make the language more human readable, or making them have really advance arithmetic options. When you make these design choices, you invariably end up with other aspects of the language either being weaker, they just arent the focus. Anytime someone makes a new "all purpose" language like the ones you list, it will end up being better in some ways, worse in others, and frequently the same but with a different coat of paint.
Turns out some people prefer red to blue, and some people are colourblind. There will never be "The one" language.
4
u/Own_Nail_2999 16h ago
C# is built for productivity. It manages most of the painful parts of programming like memory management on its own while also providing a broad library of APIs.
Low level languages like C++ are raw power. But they need extensive setup and adding libraries is such a pain in the ass. So naturally you don't want to use it for building apps. You use these languages when you decide to build something where every nanosecond matters or when building new interfaces for other programs to use
1
u/Key_River7180 16h ago
Hey who dare call F# useless?
Somebody beat me to the XKCD comic, unfortunately
2
u/This-Strategy4138 16h ago
Memory issues huh, more like shitty programmers issues.
1
u/kutac56 16h ago
A good amount of programming languages are Joke languages or personal projects. Some others have direct upgrades like B to C
1
u/edwbuck 16h ago
Because if you fix an issue with one language, you now have two languages. It's not possible to rescind a language from existence.
1
u/Kautsu-Gamer 16h ago
Why there is so many tools. The tools like hammer and simple screwdriver makes sense, but why do we need saws, chisels, pliers, and many more tools when a hammer and screwdriver is enough.
1
u/thondat 15h ago
every creator of a programming language has their own priorities and preferences. in a way, they're human expressions of what someone thinks of as the ideal programming language.
1
u/Far-Championship-883 15h ago
rust did not fix memory issues, look at the number of CVE's and attack surfaces in rust code, crate vulnerability, and then, there is the giant amount of ram consumption.
1
u/Cuarenta-Dos 11h ago
There are many decisions that you need to make when designing a language, and few of them have a "better" way of doing things. Most of them are trade-offs, or a matter of opinion.
Each programming language is essentially a sum of these trade-offs. As a developer you tend to stick to a language whose designers made decisions that make the most sense to you. Or you decide that no language does that and invent your own ¯_(ツ)_/¯
1
u/Pale_Height_1251 9h ago
There is no barrier to making a programming language other than skill, so why wouldn't there be many?
1
u/JohnnyS789 6h ago
There is only FORTRAN. All else is SIN!
1
u/mredding 5h ago
Someone doesn't read Rust related CVEs.