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

35 comments sorted by

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.

2

u/Ronin-s_Spirit 16h ago

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

1

u/johnpeters42 12h 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 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  

0

u/Skeptical_Giraffe 14h 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 16h ago

Hey who dare call F# useless?

Somebody beat me to the XKCD comic, unfortunately

1

u/Small-Dig-8233 16h ago

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

2

u/This-Strategy4138 16h ago

Memory issues huh, more like shitty programmers issues.

1

u/Ronin-s_Spirit 16h 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 11h 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 14h 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 14h 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 11h 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 11h ago

Yeah thats exactly the problem. 

1

u/Skeptical_Giraffe 11h ago

Eliminating bugs and crashes is a problem?

1

u/HalifaxRoad 11h ago

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

1

u/Skeptical_Giraffe 11h 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 8h ago edited 8h ago

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

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/burlingk 16h 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 16h ago

Just like linus's personal project

1

u/burlingk 16h ago

That one DEFINITELY escaped containment.

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/SomeGuysFarm 8h ago

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

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

like some are clear like rust and C++ because C++ had memory "issues" which rust fixed

Someone doesn't read Rust related CVEs.