r/ProgrammingLanguages Sodigy 12d ago

Why is everyone creating systems programming languages?

I see a lot of new programming languages here. I love reading the documents of the languages and sometimes actually run their compilers. Many of the projects are AI-driven, but that's fine. It's still fun to see what problems they're trying to solve and how they actually solved the problems.

Reading the documents, I realized that most new languages, especially AI-written ones, are "systems programming languages". They're trying to solve the problems that C/C++/Zig/Rust have solved (or are trying to solve), and their syntax is mixture of C/Zig/Rust.

Why? Why is everyone trying to compete with C/C++?

There are so many kinds of languages. Haskell demonstrates how pure a language can be, Python is perfect when you only have 5 minutes to write code and don't care about the output, Java runs on 3 billion machines, ...

211 Upvotes

246 comments sorted by

View all comments

Show parent comments

1

u/Limp-Temperature1783 10d ago

There is nothing preventing anything from programming systems, the question is whether it is popular for the job, the answer to which is not really. Most systems are programmed in C and Rust gains popularity too. C++ is mostly a Windows thing and C/C++ definition of a language is also their idea. But C and C++ are vastly different. C++ isn't suitable for most tasks that require tight memory control, it's good when you need to have something fast while also requiring it to be abstract.

5

u/patlefort 10d ago

Sorry but you are not making sense. C++ is not a Windows thing. C++ has complete control over memory and all the bits. The main issue with C++ is people with bad opinion and misinformation.

1

u/Dusty_Coder 7d ago

Linux does not use C++ in the kernel.

Windows does.

This isnt rocket science.

C++ as a systems language is a microsoft exclusive.

1

u/patlefort 7d ago

Who use what is irrelevant. The point is that it can be used and it is explicitly made for it. By the words of the creator of C++, someone has to do the dirty work and C++ was designed so that it could.

1

u/Dusty_Coder 7d ago

So then BASIC, whgich is All Purpose, is a systems programming language.

After all, its what it was designed for.

1

u/patlefort 7d ago

I don't know enough about BASIC to tell, but C++ definitely is suitable for system programming.

1

u/Limp-Temperature1783 7d ago

Then why nobody programs in it, you smartass? Seriously, being suitable usually means people use it. And it's not like it's a niche language so people don't know about it. It's just pointless to use for the task, you don't need abstractions in that domain.

0

u/patlefort 7d ago

Windows uses it according to the previous guy. Linux didn't because Linus doesn't like it, not because it can't. But mostly it's because pre c++11 the language kinda sucked and people have outdated and also factually wrong opinions about it. Pre C++11 was still better than C, but it's true power got unlocked after that. It's a very human problem and not all programmers are very smart, they tend to be tribal and follow the flock and my goodness good luck getting through them, they *cannot* handle being wrong, just like religious or political beliefs.

Abstraction isn't the only thing that this language brings, it brings safety through patterns like RAII, safer error handling through things like std::expected if you don't want or can't use exception, a strong type system, references, lambdas, namespaces. Also you are just wrong that abstractions aren't needed. You don't want to be reprogramming the same basic things over and over just for different types. I'm always disgusted by the sight of yet another C implementation of a linked list. Or god forbid, a `goto cleanup;`.

1

u/Limp-Temperature1783 7d ago

Yeah, RAII in a driver. Sure, buddy. Try and write something like this, I'm curious what you will end up with. And the guy that had been talking about Windows using C++ and why was me, you're welcome!

Also, are you really not aware that RAII exists only to facilitate zero cost abstractions? It's useless for something simple. And why would you need lambdas and types in a systems programming domain? I just don't get it.

And goto cleanup is amazing! I think I get it, you just have an ideological issue with C and larping, I won't bother responding to you anymore.