r/eli5_programming • u/Small-Dig-8233 • 1d 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
4
u/Revenege 1d 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.
2
u/Ronin-s_Spirit 22h ago
And some languages are simply batshit crazy like that one with an apple logo, the one made entirely of hieroglyphs...
1
u/johnpeters42 18h ago
A lot of those (esolangs, short for esoteric languages) are deliberate attempts to satirize other languages and/or otherwise be batshit crazy.
4
u/Own_Nail_2999 22h 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
0
u/Skeptical_Giraffe 20h ago
C++ is considered a high level language because it abstracts away CPU-specific instructions. The term was coined before things like garbage collection, so that's not where the line is drawn.
1
u/Key_River7180 22h ago
Hey who dare call F# useless?
Somebody beat me to the XKCD comic, unfortunately
1
u/Small-Dig-8233 22h ago
not calling it useless tho ofc every language mentioned is used in some codespace
2
u/This-Strategy4138 22h ago
Memory issues huh, more like shitty programmers issues.
1
u/Ronin-s_Spirit 22h ago
Shitty language makes it easier for any programmer to make mistakes, it's about moving the baseline. That being said I think Rust is just as shitty but for different reasons.
1
u/This-Strategy4138 17h ago •
![]()
I think it's an intellectually dangerous slope, making fool-proof languages because programmers can't write good enough code with languages of sound and rational design that rely on the programmers abilities is calling for lowering the bar on discipline, care and skills.
I know it's idealistic, borderline naive, but there's virtue in honing a craft nonetheless.
1
u/Skeptical_Giraffe 20h ago
It's like physical power tools, where they make them safer by designing them to be difficult or impossible to use in a dangerous way. It's better to design safety into it than to rely on human behavior.
1
u/HalifaxRoad 20h ago
And performance of software just keeps getting worse.. We have an epidemic of shit code and its only getting worse.
1
u/Skeptical_Giraffe 17h ago
I'm trying to say, it's better to have memory safety built in to the language. CPUs are so fast now that a little extra time spent on garbage collection doesn't matter in most cases, and eliminates a whole category of bugs and crashes.
1
u/HalifaxRoad 17h ago
Yeah thats exactly the problem.
1
u/Skeptical_Giraffe 17h ago
Eliminating bugs and crashes is a problem?
1
u/HalifaxRoad 17h ago
no, the mindset that cpus are so fast now nothing matters
1
u/Skeptical_Giraffe 16h ago
You might try getting hired to do high speed trading code for finance, where speed is the only thing that matters. I was trying for that but got hired for networking first.
1
u/SomeGuysFarm 14h ago edited 14h ago
There will always be people who think that having a sink is better than not pissing on your fingers...
1
u/kutac56 22h ago
A good amount of programming languages are Joke languages or personal projects. Some others have direct upgrades like B to C
1
u/burlingk 22h ago
Sometimes a person's joke/project language gets out of hand and escapes containment... Probably how we got more than a few of the existing ones.
1
u/Kautsu-Gamer 22h 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/Far-Championship-883 20h 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 17h 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 15h ago
There is no barrier to making a programming language other than skill, so why wouldn't there be many?
1
1
u/mredding 10h ago
like some are clear like rust and C++ because C++ had memory "issues" which rust fixed
Someone doesn't read Rust related CVEs.
1
u/furry-fornicator 4h ago
languages aren't just syntax either, no one mentioning it here?
eg .NET is an entire runtime and library ecosystem. Choosing between C and C# is not just about syntax... That's probably not even half of it.
8
u/reklamationer 1d ago
https://xkcd.com/927/