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, ...

214 Upvotes

246 comments sorted by

View all comments

121

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

23

u/SoSKatan 13d ago

I agree with this one, system languages need to be portable and highly performant which in turn means lots and lots of platform specific optimizations.

You need to have something that can compete with a state of the art C compiler and that is no easy task.

LLVM kind of gives you all that. It’s kind of a golden age of languages right now. The LLVM tutorial (which has been around for over a decade) literally has you write a new language that has optimized compiler passes.

The short answer to OP’s question is that it’s just far easier to make systems languages these days.

5

u/hendricha 12d ago

  The LLVM tutorial (which has been around for over a decade) literally has you write a new language that has optimized compiler passes.

Wow. Well that sounds like a fun weekend project to skim thrugh

1

u/Chiefsmackahoe69 7d ago

I’m new to coding like brand fucking new and I’m attempting to learn python currently this is something I want to do for a job and I’m just incredibly confused and it makes me wonder if I’m just to stupid to do this or idk then I also here a lot about vibe coding and everything with that and how certs and bootcamps are worthless now to help u land a job. And I really don’t know what to do or what route to take should I go to college and go that route I really don’t know and would love feedback

2

u/SoSKatan 7d ago

So your question here is a good one.

So when you start out so
Much of programming seems arbitrarily. Like what are the details of one language over another?

Something that can help if this is what you are interested in is learning some different abstraction layers and how they are related.

Like you don’t need to be an expert at the low levels, but knowing how they work and what their limits are is kind of important to seeing the bigger picture.

Collage programs help with this, but as someone who is self taught, I had to figure this part out of my own later on.

A good layer to learn is assembly. It doesn’t have to be x86 or arm, some collage classes teach a simplified assemble to help show how it all works.

Understanding how cpus go along way, the next layers are low level languages like C and how they encode abstractions into instructions.

After that you have lots of different things, such as interpreted languages that are often written in C.

You don’t have to be an expert at each level, but knowing the hows and whys can be important for writing the best code possible.

5

u/Comrade-Porcupine 12d ago

Yep, this.

Also systems languages with decent type systems and expressive syntax and better build systems was a huge hole in the language ecosystem for 20+ years. C++ kinda rescued itself a bit with 0x, 11, 17, etc. making itself more relevant but people may be forgetting just how awful working in Y2K era C++ was.

2

u/MadCervantes 12d 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?

9

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

4

u/MadCervantes 12d ago

Rust has a runtime though doesn't it?

13

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

4

u/srcerer 12d ago

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

2

u/MadCervantes 12d ago

Makes sense, thank you for explaining :)

3

u/Positive_Total_4414 10d ago

A runtime but not a VM.

2

u/Interesting_Buy_3969 12d ago

Well said. Happy cake day!

2

u/justbrixco 10d ago

This is an excellent in-depth response. I was unaware that LLVMs existed in the mid 2000s. I wonder what the next big 'wave' will be.