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

46 comments sorted by

4

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

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

1

u/johnpeters42 7d 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 8d 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 8d 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 8d ago

Memory issues huh, more like shitty programmers issues.

1

u/Ronin-s_Spirit 8d 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 7d 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/donaldhobson 1d ago

> I know it's idealistic, borderline naive, but there's virtue in honing a craft nonetheless

In many disciplines, honing the craft is about inventing and using better tools, making a sharp chisel rather than learning how to work wood with a blunt chisel.

1

u/Skeptical_Giraffe 8d 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.

2

u/HalifaxRoad 8d 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 7d 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.

2

u/HalifaxRoad 7d ago

Yeah thats exactly the problem. 

1

u/Skeptical_Giraffe 7d ago

Eliminating bugs and crashes is a problem?

3

u/HalifaxRoad 7d ago

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

1

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

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

1

u/This-Strategy4138 1d ago

I agree with you, faced with heavy constraints, like limited cpu power or memory, these programmers wouldn't know what to do.

1

u/Skeptical_Giraffe 21h ago

Well, I'm one of the programmers who know. I'm just saying there's a heavy price to pay if you have to use languages that aren't memory safe, and projects should avoid them if they can. Anyone who needs C or C++ work will have to pay for the expertise of devs like you and me.

1

u/donaldhobson 1d ago

And, if you want performance, and safety, there is rust.

1

u/kohugaly 3d ago

There is no such thing as shitty programmers issues. It's development process issues, which turn into legal issues, once your software causes damage to a client.

The only way to wiggle out of it is proving that the damage happened withing acceptable risk margins and therefore you aren't liable. And to prove that, you need to prove that you've set up a development process that reduces the risk to acceptable margins.

"shitty programers issues" is not a defense - it's an admission of guilt.

1

u/This-Strategy4138 3d ago

I had not realized that this was a legal strategy debate.

1

u/kohugaly 3d ago

Software is ultimately run as part of machines. So it falls under the same safety regulations.

"shitty programmer" excuse is fine if you're shipping an indie game on steam.

But software that actually does useful stuff also does stuff that could cause damage, injury or death if done wrong. Like controlling robots in factories, running vehicles, semaphores, elevators, home appliances, medical devices, doing financial transactions, calculating insurance,...

There are safety regulations that the software has to meet. Legal procedures to determine liability when accidents happen.

I've worked as embedded C/C++ developer in automotive industry. We had a test driver die on a test track once... Let me tell you, was the most sobering experience in my entire life. A very dark reminder for why he have such a complicated development process, with so many checks, procedural documentation, audits, and why that process get updated on regular basis.

1

u/This-Strategy4138 3d ago

I'm sorry, I should have been clearer : this was NOT an invitation to further discuss your point.

Furthermore, you're beside the point of this post. Are you trying to establish that safety is primordial ? Are you trying to exonerate shitty programmers ? Did you kill someone ?

1

u/Key_River7180 8d ago

Hey who dare call F# useless?

Somebody beat me to the XKCD comic, unfortunately

1

u/Small-Dig-8233 8d ago

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

1

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

Just like linus's personal project

1

u/burlingk 8d ago

That one DEFINITELY escaped containment.

1

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

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

1

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

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

1

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

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

1

u/JohnnyS789 7d ago

There is only FORTRAN. All else is SIN!

1

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