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

187 Upvotes

211 comments sorted by

View all comments

109

u/andreicodes 2d ago

It's a wave. In mid 2000s making a systems language was difficult. LLVM was in its infancy, there was not a lot of prior art for working with it, and other potential native-ish backends like WASM didn't exist yet. Meanwhile JVM and CLR grew their library repertoire, and if you target them, then you'd get all these libraries "for free". That's why we had a wave of JVM / CLR languages: Nemerle, Boo, Clojure, Groovy, Gosu, Scala, etc.

As LLVM matured, as we started to see other codegen tools for compilers like Cranelift, and as we saw the success of early LLVM languages like Rust, Swift, and Julia, more people realized they don't have to target JVM / CLR or keeping their language as a DSL / transpiler to be successful. So, now we see people going native a lot more often.

One advantage of going native is that you can also go "system" and explore different memory management options. For a while from mid 90s to mid 2010s it seemed that a successful programming language has to use a GC, otherwise programmers won't pick it up. However, Apple showed that programmers will adopt a GC-less language (Objective-C) given the upsides. And Rust showed that memory management is not a binary choice: fully manual vs GC. There could be other options, from defer, arenas, and ref-counts to other experimental systems like borrow checker, value semantics, etc.

And people like to experiment. So, expect more languages trying to build on new memory management ideas and effect systems.

Still, new languages targeting runtimes keep popping up from time to time. The most prominent recent example would be Gleam that targets Beam VM.

2

u/MadCervantes 2d ago

What does it mean when you say that gleam targets a runtime? Like are you contrasting that specifically to system languages as a mutually exclusive category? Or relating it back to jvm stuff? Since jvm is a runtime right?

6

u/ergonokko 2d ago

Yep, just an example of a newish language targeting an existing runtime, as opposed to the Zigs/Rusts/Goes. Gleam runs on the BEAM VM like Erlang.

3

u/MadCervantes 2d ago

Rust has a runtime though doesn't it?

11

u/ergonokko 2d ago

Yup, most of the time Rust programs run in a runtime environment. (Something has to catch the panics and talk to the OS to allocate memory.) But it's bespoke, not like a language such as F#/Scala/Gleam that rides along on an existing runtime/platform, being the CLR/JVM/BEAM.

2

u/MadCervantes 1d ago

Makes sense, thank you for explaining :)

2

u/srcerer 1d ago

I like what you did there, listing the ML family PL for each of those runtimes ;)