r/ProgrammingLanguages • u/thecoommeenntt • Mar 08 '26
I’m building a programming language (Cx) would anyone be willing to check it out and give feedback?
Building a systems language called Cx looking for design feedback
Site: https://cx-lang.com · Repo: https://github.com/COMMENTERTHE9/Cx_lang
Cx is a systems language aimed at game engines and real-time simulation. Early stage tree-walk interpreter right now, compiler backend coming.
Core goals
- No GC, no runtime pauses
- Deterministic memory via arenas + handles
- Control without a borrow checker
What's working today
- Functions with typed params, implicit/explicit returns
- Numeric types
t8..t128,f64, strings with{name}interpolation - Arena allocator + free checker (double-free prevention)
Handle<T>registry with generation counters and stale detection- Parameter copy modes:
.copy,.copy.free,copy_into whenblocks with ranges, enums, and three-state bool (true/false/unknown)- Basic enums
Not done yet
- Loops, structs, arrays
- Modules, generics, stdlib
- Compiler backend
cx
fnc greet(name: str) {
print("hello {name}")
}
greet("Zara")
4
Upvotes
View all comments
Show parent comment
1
u/thecoommeenntt Mar 08 '26
It works like this When you open a scope with {} that is the arena. Everything declared inside lives there. { x: t64 = 10 y: t64 = 20 } // x and y are gone here The free checker is a list that lives inside that scope. It has one job prevent the same variable from being freed twice. Here is what it does step by step: { x: t64 = 10 temp: t64 = 42
} // scope closes runtime walks everything // sees x.copy already on the list SKIP // sees temp not on list FREE, add to list // sees x not on list FREE, add to list // scope dead list wiped with it Without the free checker: { x: t64 = 10
} // scope closes tries to free x.copy again // DOUBLE FREE memory corruption The free checker is what stands between those two outcomes. Check before free, record after free, wipe when scope dies. That is the whole thing.