Coming from C
Tape's t0 profile is designed for the same domain as C — kernels, drivers, embedded. You get the same level of control with fewer sharp edges.
headers & modules
C
#include, header files, include guards, forward declarations. Textual paste.
Tape
import io from "io" — real modules with namespaces. No headers, no include order issues.
error handling
C
Return -1/NULL, check errno, easy to forget. No enforcement.
Tape
T or E — compiler forces you to handle the error. Can't accidentally ignore it.
unions & enums
C
Raw unions (no tag), enums are just ints, no exhaustive switch checking.
Tape
tagged unions with compiler-enforced exhaustive match. Raw union still available when you need it.
strings
C
Null-terminated char*. Manual strlen, buffer overflow risk, no length info.
Tape
string is ptr + len + cap (t1) or ptr + len (t0). UTF-8. Interpolation built in.
what stays the same
- - Direct pointer manipulation (*T, &x)
- - Manual memory management (no GC in t0)
- - Inline assembly for hardware access
- - Emits native code directly (no VM required)
- - C interop via extern fn / @export