What's Different From Traditional Programming

For programmers coming from C, Python, and everything else.

If you've written code in C, Python, or most anything else, Sanguis works differently. Here's what changes.

What changes coming from C or Python

If you've written code in C, Python, or most anything else, here's the honest comparison.

Control flow

Sanguis has the control flow you know: if/else, while, and cells are functions. What it doesn't have: for (use while with a counter), switch (chain if/else), goto (deliberately absent: a jump is a conditional in disguise).

Data types

TraditionalSanguis
int, float, doublefloat (floating-point numbers)
stringstring
boolUse numbers (0.0 false, 1.0 true), or boolean circuits
struct with methodsorgan with fields and cells
int[], arrayslist via grow_list

Organs are the struct equivalent: declared fields, methods, and a manifest that travels with the compiled artifact.

Assignment

Inside cells, you assign directly: let x = 5; and x = x + 1;. On the GPU, an organ's field is a wire: writing it drives the wire, reading it senses the wire.

Parallel by default

In traditional languages, code runs sequentially. In Sanguis, the whole grid evaluates simultaneously: every switch, every wire, every pass.

TraditionalSanguis
Sequential executionParallel grid evaluation every sweep
Shared mutable state + locksSnapshot semantics, no races
Threads, async, goroutinesNot needed: parallelism is the default
Manual synchronizationThe engine handles it via sweep snapshots

All switches see the same snapshot at the start of a sweep. One switch's change is not visible to another switch until the next sweep. Data races are eliminated by design.

No interpreter, no JIT, no runtime library

The program compiles into switch-and-wire data. The GPU kernel that runs it is fixed: the same kernel for every program. There is nothing to deploy alongside your program except the kernel itself.