r/eli5_programming • • 2d 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 Upvotes

38 comments sorted by

4

u/Revenege 2d 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 1d ago

And some languages are simply batshit crazy like that one with an apple logo, the one made entirely of hieroglyphs...

1

u/johnpeters42 1d 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 1d 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 1d 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.

4

u/This-Strategy4138 1d ago

Memory issues huh, more like shitty programmers issues.

1

u/Ronin-s_Spirit 1d 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 1d ago • Bravo

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 1d 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 1d 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 1d 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 1d ago

Yeah thats exactly the problem. 

1

u/Skeptical_Giraffe 1d ago

Eliminating bugs and crashes is a problem?

2

u/HalifaxRoad 1d ago

no, the mindset that cpus are so fast now nothing matters

1

u/Skeptical_Giraffe 1d 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 1d ago edited 1d ago

There will always be people who think that having a sink is better than not pissing on your fingers...

1

u/Key_River7180 1d ago

Hey who dare call F# useless?

Somebody beat me to the XKCD comic, unfortunately

1

u/Small-Dig-8233 1d ago

not calling it useless tho ofc every language mentioned is used in some codespace

1

u/kutac56 1d 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 1d 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/kutac56 1d ago

Just like linus's personal project

1

u/burlingk 1d ago

That one DEFINITELY escaped containment.

1

u/edwbuck 1d 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/SomeGuysFarm 1d ago

Though for COBOL, I think it's absolutely worth a try!

1

u/edwbuck 23h ago

As I recall, a COBOL standard was updated a while ago to permit Object Oriented COBOL. I'm pretty sure it has even less penetration into the marketplace, but it sounds like a hilarious flex to say you know it.

1

u/SomeGuysFarm 21h ago

Flex, or a desperate cry for help with self-loathing!

1

u/Kautsu-Gamer 1d 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 1d 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 1d 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 1d 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 1d ago

There is no barrier to making a programming language other than skill, so why wouldn't there be many?

1

u/JohnnyS789 1d ago

There is only FORTRAN. All else is SIN!

1

u/mredding 1d 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 1d 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.