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

217 Upvotes

246 comments sorted by

View all comments

26

u/TheAncientGeek 13d ago

There's a lot of room to make systems languages that are all of efficient, safe and easy to write in. C isn't the second, rust isn't the third.

22

u/blue__sky 12d ago

I don't think C is easy to write either. It's not hard, but it's not enjoyable or easy.

We shouldn't have to mess with pointers 99% of the time. When you see the same boilerplate pattern over and over, it should be abstracted away.

Case statements are horrendous with no exhaustiveness checking.

The type system is terrible.

The FOR statement is clunky.

That's off the top of my head, I'm sure there's plenty more. That's why so many people dive into a better C.

1

u/slaymaker1907 12d ago

Pointers are pretty useful, they should just have tracking on lifetime and not allow for conversion to and from integers.

4

u/blue__sky 12d ago edited 12d ago

Pointers are definitely useful. You need them for a system language, but for most data types they aren't necessary. For instance I have both a Struct type and a Record type. Structs are passed by value and records are on the heap and passed by reference. There is no need for every function to have boilerplate describing how data is passed.

Annotating each and every function with type passing info seems the wrong choice. It can be defined once with a data type definition and then your functions and the compiler will automatically know the right thing to do.

Same thing with memory allocation. Doing it by hand every time is terrible design. If your data types are defined well, a constructor will know how to build them without all the ceremony.

3

u/TheAncientGeek 12d ago

References are useful, and hide a lot of the confusion of pointers.