The lineage, what replaces what, and what is not here
CX did not arrive from nowhere. Its first two generations were written in PureBasic — an interpreter, then a compiler — and a lot of what CX feels like when you type it comes from years of PB habits being taken seriously rather than argued with. If PB is your daily language, several things here will read as familiar before they read as new.
This page is honest about the lineage, honest about what is gone, and honest about what does not exist yet. It promises nothing.
CX generation 1 was a PureBasic interpreter. Generation 2 was a PureBasic compiler with its own VM. Both are retired — generation 2 was retired in May 2026 — and the current CX is a third-generation implementation written entirely in C. No PureBasic runs anywhere in it, and no part of the toolchain needs a PB installation.
What survived the rewrite is not code. It is a set of judgements about what a language should feel like, most of which PB got right and most other languages did not:
That is the inheritance. What changed underneath it is the substrate.
The habits map over almost one for one. The spellings differ.
| PureBasic habit | CX |
|---|---|
Debug x | print(x) |
a.i, s.s, f.f | a.i, s.s, f.f — the same idea, the same letters |
Procedure.i Add(a.i, b.i) | function add.i(a.i, b.i) |
ProcedureReturn v | return v; |
NewList items.i() + AddElement() | list items.i; + listAdd(items, v) |
ForEach items() | foreach items { v.i = listGet(items); } |
NewMap ages.i() | map ages.i; + mapPut(ages, "ada", 36) |
Dim board.i(8, 8) | array board.i[8][8] |
Structure … EndStructure | struct name { field.i; } |
If / EndIf, While / Wend | C's braces: if (...) { }, while (...) { } |
Str(), Val(), Left(), Mid(), UCase() | str(), vali(), left(), mid(), ucase() |
#CONSTANT | #define CONSTANT |
Two of those are worth a sentence each.
mid() is still 1-indexed. That is BASIC heritage and CX kept it on purpose, even though array indices are 0-based as in C. It is the one inconsistency in the language and it is deliberate: it is what a BASIC hand expects, and every CX doc warns about it in the same place.
Identifiers are case-insensitive, as in PB. myVar, myvar and MYVAR are one variable:
myVar.i = 1;
myvar = myvar + 41;
print(MYVAR);
42
And the syntax you will notice immediately: CX uses C's braces and semicolons, not EndIf / EndProcedure / Wend. A CX program looks like C on the page. That is not decoration — it is the whole reason for the third generation, which the next section is about.
PureBasic compiles to a native binary, so "CX is native" is not the difference. The difference is what the language sits on.
Every C library is reachable, because the output is C. CX compiles your program to C and hands it to a real C compiler. A C library is not a wrapper project; it is an include and a link line. And where CX has no builtin for something, _C{ ... } drops verbatim C into the output:
_C{
printf("straight C\n");
}
C's data structures are yours. Pointers, structs, a struct field that points at its own type — so linked lists, binary trees and adjacency graphs are written the way C writes them, with p->next and all, rather than emulated:
struct point { x.i; y.i; }
point *p;
p = new point;
p->x = 3;
p->y = 4;
printf("(%d,%d)\n", p->x, p->y);
delete p;
(3,4)
new and delete take from CX's own garbage-collected allocator and no byte count appears in the source — the size comes from the struct's shape. malloc and free are still there, and still mean exactly what C means.
And there is a second backend. The same source that compiles to a native binary also runs on CX's register VM, in-process, with the same output. That is what lets a CX program compile a function while it is running — a rule read from a config file, or written by a language model — and attach it to live state without a recompile or a plugin system. It is also what lets CX run in a browser tab, where there is no C compiler to call.
That combination is the reason for the rewrite: PB's ergonomics, C's substrate, and a VM for the parts that have to change while the program is alive.
Said plainly, because a comparison page that only lists wins is not useful.
OpenWindow, ButtonGadget, ListIconGadget or their siblings. CX's graphics are a game-shaped API (a render loop, sprites, 3D, particles) built on raylib, which is a different thing from a forms toolkit, and it currently ships windowed on Windows with Linux and macOS headless.