← Back to blog
Building GX · · DevDad

Why another programming language

What I found missing in the languages I use for games and systems work, and the gap GX is meant to fill.

design philosophy comparison

“Yet another language” is a fair thing to be skeptical about. There are plenty of options already, and most of them have companies behind them that are an order of magnitude larger than anything I can put behind GX. So before the syntax, the backends or the module system, I owe you an answer to the obvious question: why does this exist at all?

The short version: after years of writing games, graphics code and systems utilities, I kept hitting the same ceiling. Every language I reached for had one specific thing it would not let me do cleanly. GX is the language I wanted to already exist.

This post goes through what I ran into and where I think the gap is.

Other languages, one paragraph each

C

C is still the baseline. It compiles everywhere, talks to everything, and gives you exact control over memory and layout. But it is over 50 years old and it shows. There are no modules, only #include and the preprocessor. There are no real strings: a char* points at a byte, maybe null, maybe not terminated, maybe at something freed five calls ago. No slices, no type-safe generic containers. The preprocessor substitutes text before the type checker knows what a type is, so macros don’t compose and errors come out as long, unreadable cascades. Large, safe C programs exist, and a lot of the world runs on them, but they take discipline, conventions and a lot of defensive code. The language doesn’t help.

C++

C++ fixes some of C’s problems by adding features. A lot of features. The modern language has lambdas, templates, concepts, constexpr, modules (finally, sort of), ranges, smart pointers and move semantics. The good parts are good. The cost is the rest of the language. Every C++ codebase is written in its own dialect, and choosing that dialect (exceptions or not, which RAII patterns, std:: containers or not, which build system, which ABI) is a decision that takes months before anyone writes real code. Compile times grow with template depth. Debug builds are slow. And most of C’s footguns are still there, now next to a hundred new ones.

Rust

Rust solves memory safety without a garbage collector, and its ecosystem is good. I’m glad it exists. I just don’t enjoy writing it. It is strict in a way that stays strict. It never levels off; you keep spending effort on the lifetime structure of the program instead of the problem. For OS kernels, browser engines, or anything where a memory bug is a CVE, that trade is clearly worth it. For most of what I do (games, graphics, tools, prototypes) it isn’t. I don’t want to argue with the compiler about who owns the level editor’s undo buffer. I want to write the undo buffer.

Compile times matter too. Cargo is excellent and small crates rebuild quickly, but a clean build of a real Rust project still takes minutes, and that adds up over a day of iteration. When the compiler is finally happy, I often am not, because I spent the hour pleasing it instead of building the thing.

Odin

Odin is the closest to what I want. It is a very good language: clean syntax, comfortable to write, no GC, good C interop, vector and matrix math built in, an implicit context, distinct types without the type-theory vocabulary. It gets a lot of decisions right and it feels good to write. If I had to pick an existing language, this is the one.

Where Odin stops, for me, is portability as an application platform, as opposed to portability as a systems language. Those are two different problems.

As a systems language Odin is portable. It targets the major desktop platforms and has solid vendor bindings for the APIs you actually call: Metal, MetalKit and CoreVideo on macOS, Direct3D on Windows, Box2D and the usual graphics stack everywhere. For a C-style engine, a custom renderer, a tool or a desktop game, it is a pleasant choice.

Shipping an app is harder, and on mobile much harder. iOS and Android are more than “compile for ARM and link”. The work is in everything around the code: project generation, the app lifecycle, signing and provisioning, Objective-C and Swift interop on iOS, Java, Kotlin, JNI and Gradle on Android, UI bindings, asset packaging, store deployment, debugging and profiling. Odin doesn’t have that layer, and without it “portable” means less than most people assume. For mobile apps today I would only use Odin if I were writing my own engine anyway and didn’t mind writing the platform glue. For ordinary mobile apps, Flutter, Kotlin Multiplatform, native Swift and Kotlin, or C++ with platform wrappers are more practical.

I bring this up because it is exactly where I don’t want GX to stop. Today GX is a systems language, and a decent one. Over time I want it to close the application gap too: editor support, platform glue, asset pipelines and mobile targets as part of what the language provides, not something left to each user.

Zig

Zig is the next closest. Its philosophy (no hidden control flow, no hidden allocations, everything explicit) is the right one, and I hope it does well. But writing Zig every day, I don’t enjoy it. It is verbose. Every detail the language is proud of making explicit is one more thing to type, on every line, forever. After a while I noticed I wasn’t having fun. I agreed with the philosophy, and the day-to-day experience still wore me down.

I respect Zig a lot. In many ways GX is what you get if you agree with Zig’s philosophy but want writing the code to feel lighter.

Go

Go is great at what it is built for: network services, command-line tools, anything where you want one binary and no thoughts about memory. But it has a GC, and for the work I care about that rules it out. A 5 ms pause is a disaster inside a 16.6 ms frame. Generics did arrive, but much of the ecosystem was built around their absence. The language is small on purpose, which is a strength, and the result is a lot of code that a stronger type system would let you skip.


The gap

This is the list I kept wanting:

  1. Compiles through C. C is not beautiful, but it is everywhere. If I can produce C, I can build for anything that has a C compiler, which is nearly everything. I get every debugger, profiler, linker and target that C has reached, 50 years of tooling I don’t have to rebuild.

  2. Modern syntax. Modules instead of #include. Strings that know their length. Slices. Tagged unions. Enums that are more than integers. String interpolation, pattern matching, defer. Things good languages have had for 20 years.

  3. No garbage collector and no hidden allocations. Every allocation and every free is visible in the code. No destructors run behind your back, so you can tell what the program is doing.

  4. No borrow checker. The defaults are safe (pointers are const by default, a function cannot return a pointer to a local), but if your data structure needs a cycle, you write the cycle. The compiler trusts you.

  5. Compile-time code as part of the language. No macro system and no template metaprogramming: real compile-time functions, compile-time loops, and reflection over struct fields, usable from the start and readable like normal code.

  6. Build settings in the source. If a file needs -lopengl32 on Windows, that belongs to the file, not to a separate build script someone has to keep in sync. @link, @cflags and @cfile go in the .gx file that needs them.

  7. C interop without a bindings generator. With a C header, I want to @c_include it, write an extern block and be done. No generation step, no build plumbing, no generated file to keep under version control.

No existing language does all of this. C does (1), (3) and (7). Rust does (3), (5) and (7), though not the way I want. Odin does most of it well on the desktop, but doesn’t reach into the application side I want GX to cover eventually. Zig shares the philosophy but is heavier to write. Go does (2) and not (3). Each of them is a sensible set of trade-offs for something. None is the set I want for this.

Where GX stands

I spend about a third of my life programming. That makes the language I use one of the rooms I spend the most time in, and I don’t want to be fighting that room. I want to be able to relax in it, move quickly in it, and still take it seriously.

So the bar for GX is specific:

  • Simple, as simple as it can be without hiding what the machine does.
  • Short to write. As little code as the problem needs, without ceremony or the same four lines repeated everywhere.
  • Serious. Real types, real compile-time code, real C interop and real performance, good enough to ship games, engines, tools and systems code.
  • Not restrictive. Safe defaults, but if you need a pointer cycle or an odd memory layout, you write it.
  • Fast to iterate. Edit, compile and run takes seconds. With the bundled TCC a clean rebuild of a whole project finishes before you have time to switch windows.
  • Fast at runtime. No GC, no hidden allocations, C-compatible layout, and -O2 or -O3 through clang or gcc when you need it.
  • Portable to wherever C goes. Windows, macOS, Linux, the BSDs, embedded targets, and WASM through Emscripten.
  • Enjoyable. This is the vague one and also the one that matters. If writing GX doesn’t feel good, the rest is irrelevant: I’ll stop using it, and so will you.

GX is not trying to be a better Rust, replace C++, or compete with Go for backend services. It is meant to be C with the comforts: the language you would use where you use C today, but with the last 30 years of language design applied, and pleasant to write.

If you come from Python, JavaScript or Ruby, GX may suit you more than you’d expect. It is easy to write. You don’t have to spell out the type of every variable. Strings are a real type with real string functions, so there is no char* juggling. Arrays, dynamic arrays and hash maps are part of the language rather than a library choice. defer makes cleanup obvious and memory management much easier than in C or C++. If you have written dynamic-language code and wanted something fast and native without spending a summer learning the borrow checker, GX is a reasonable place to start. With a little effort you get code that is faster, more predictable, and still easy to read a week later.

If you write safety-critical software and want the compiler to prove there are no memory bugs, Rust is probably the better fit. If you write heavily concurrent web backends, Go probably is.

The weak spot right now is the ecosystem. GX has been in development for three years and its library list shows it. The C ABI makes up for much of that. Because GX speaks C directly, all of C (decades of libraries, every graphics API, every database client, every codec) is reachable through @c_include and extern. It also means GX modules can appear quickly, since most new modules wrap a C library that already exists.

Where GX is going

This post is mostly about why, but part of the why only makes sense once you see where the language is heading, so here is a short sketch.

Editors and tools. There is already an IntelliJ plugin with highlighting, completion, go-to-definition, find usages and debugger support. A language server is next, which brings VS Code, Neovim, Sublime, Helix and Zed up to the same level. I treat tooling as part of the language, not something added later.

Two native backends today. GX ships a C backend (the default, with TCC bundled and nothing else to install) and an LLVM IR backend (--backend llvm, through clang). The language, the modules and the output are the same. The C path gives portability and fast iteration; the LLVM path gives native vector IR and clang’s full optimizer.

Update (May 2026): GX now has a native LLVM backend built on the LLVM C++ API. --backend=llvm builds an llvm::Module in the compiler process, runs the verifier, applies the -O0 to -O3 pass pipeline and emits DWARF for lldb and gdb. The text-emitting variant is still there as --backend=llvm-clang, so there are now three native backends.

The GPU as part of the language. This is the part I look forward to most. The plan is for GPU compute to be written in GX itself, not in a separate shader language: you write the kernel in GX, mark it, and the compiler handles the dispatch, with the same syntax, types and type checker. No switching to GLSL, HLSL or WGSL, and no hand-written buffer marshalling. The backend abstraction that already separates C and LLVM is the one a GPU backend plugs into.

Vector numerics. GX already has vec2, vec3, vec4 and mat2, mat3, mat4 built in, with operators and swizzles. The next step is one numeric model for batched types such as f32x8, boolx8, vec3x8 and mat4x8, where if accepts a mask and lowers to predicated execution. Scalar code stays scalar. Batched code becomes real vector IR on LLVM, structured loops on C, and TypedArrays on JS. The semantics are the same on every backend, and SIMD is the backend’s business, not a dialect the user has to learn. It also fits the GPU plans and later work on tensors.

An application platform. Back to the Odin section: systems portability is where GX starts, not where it should end. Eventually the language has to include the unglamorous parts too: project setup, platform wrappers, packaging, signing and deployment. That is where most languages in this space stop, and it is why “portable” so often means less than it sounds.

None of this has a date. It is the direction. What exists now (modules, real strings, hash maps, defer, allocators, compile-time reflection, two working backends) is the foundation, and the list above is what it is a foundation for.

If you write games, graphics, engines, tools, utilities or embedded code, and C is still the default answer in your corner and you have put up with that for longer than you’d like, GX is trying to be a better default. One you are happy to open the editor for.

Next posts

The next posts go into specific decisions. Post 02 is about why GX compiles through C, and what that means for the LLVM backend that just shipped. Post 03 is about memory: how GX does without both a garbage collector and a borrow checker. Post 04 is about strings, and post 05 about compile-time code.

To skip the theory, the Playground runs GX in the browser and the docs cover the whole language.


I’m curious what bothers you about the language you use now for systems or game work, and what you gave up on and worked around. Tell me on Discord. Those complaints are the problem GX is trying to solve.