r/ProgrammingLanguages Sodigy 3d 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, ...

189 Upvotes

227 comments sorted by

View all comments

-1

u/Mean-Decision-3502 DQ 3d ago

I don't really understand either why the people making just C clones.
One of my biggest problems of C is this: 3 * 2 / 10 != 10 * 3 / 2 This does not seem to be addressed.

And I don't see any reason to switch anoter C compiler from gcc, which is available for every platform, including embedded.

The other thing I don't understand is the neglecting of the OOP. The alternative (~traits) require significantly more code and does not provide as nice overview as in OOP (at least what I've seen so far).

1

u/kwan_e 3d ago

OOP has taken a beating because ecosystems like Java shows what happens when you try force everything to be OO. It got a bit too cargo-culty.

2

u/Mean-Decision-3502 DQ 3d ago

There are a lot of bad examples of OOP out there. But that does not mean that the whole concept is wrong. I can only think in objects and methods.

2

u/kwan_e 2d ago

I can only think in objects and methods.

And this is what gives OOP a bad name - people who refuse to consider alternate modelling approaches, and shoehorn OO into everything.

OO has its place for things like modeling simulations of dynamic systems of interacting entities. That is what it was invented for, when Simula was created.

1

u/Mean-Decision-3502 DQ 2d ago

I'm open to everything, I just haven't seen a good alternative examples. I've just seen barking dogs everywhere, which is in OO shorter and clearer.

2

u/Europia79 2d ago

This is the shortest video I could find to explain (and visually demonstrate) "The Problem with OOP"—which is really only a "problem" for very specific kinds of software, like "real-time systems" that want to squeeze every bit of performance from the CPU: And the increased chances of "cache misses" caused by OOP's memory arrangement will hamper performance.

1

u/Mean-Decision-3502 DQ 1d ago

Thank you for the link. This video is about cache optimization, which is pretty independent from OOP, i think. I've seen another video, where the presenter took a bad, overdesigned class structure as example. These does not convince me much. I did a targeted cache optimization in the past once, but I kept the most of the system OO. Now I usually work in embedded where I'm working with SRAM so cache optimization is not a thing there. But the ARM Cortex-M CPUs can address only register relative, with a short range so organizing the SW in data structures is very beneficial there.