← back

Coming from Zig

Tape and Zig are the most philosophically aligned — comptime over generics, explicit over implicit, no hidden allocations. The differences are in scope and target domain.

comptime

Zig

comptime keyword on params/blocks. Type is a first-class value. Generates code implicitly during instantiation.

Tape

@tape {} blocks run at compile time. @emit injects declarations explicitly. Every specialization is visible at the call site.

UI & components

Zig

No built-in UI model. You use C libraries such as SDL or raylib, translating their headers with the build system's translate-C (@cImport is deprecated as of 0.16). UI is purely a library concern.

Tape

Components are in the language: component, prop, event, view {}. Compiler generates vtables and handles lifecycle.

source structure

Zig

One language, one syntax everywhere. Tests via test "name" {} inline.

Tape

Source regions: #code, #view, #style, #test. Each has its own parser optimized for its domain. All emit the same TAC IR.

profiles

Zig

The same language rules everywhere. Freestanding or hosted is a choice of target. The build mode (Debug, ReleaseSafe, ReleaseFast, ReleaseSmall) sets safety checks and optimization.

Tape

Three profiles per module: t0 (kernel/freestanding), t1 (typed apps), t2 (scripting with optional GC). Mix them in one project.

memory

Zig

Explicit everywhere. Anything that allocates takes an allocator, and cleanup is written out with defer. No GC, and nothing is freed for you.

Tape

t0 works like Zig: no implicit heap, explicit allocators and defer. In t1, string and other owned types are freed automatically at scope exit, and concatenation allocates. t2 adds an optional GC.

operators

Zig

No operator overloading. a + b is always the built-in operation.

Tape

Value types can define op_add, op_mul and the other operator methods. a + b resolves statically to Type.op_add(a, b); there is no dynamic dispatch.

running code

Zig

Compiled only. zig run builds a native executable and then runs it. There is no interpreter or REPL in the toolchain.

Tape

tape run runs a script directly in the VM, with no native build step. An interactive tape repl is planned. tape build compiles the same source to native, and the VM and native results are identical.

toolchain size

Zig

About a 50 MB download (Zig 0.16; about 97 MB for Windows). The size comes from also being a Clang-compatible C compiler, with libc for dozens of targets.

Tape

About 8 MB to download (7.3 MB for macOS arm64). That covers the compiler, VM, language server, stdlib, runtime libraries and the embeddable VM library. Tape emits x86-64 and arm64 machine code itself, with no LLVM. It does not compile C; C libraries are called through extern fn.

what stays the same

  • - Comptime replaces generics — same philosophy
  • - Low-level code (t0 in tape) has no hidden allocations and takes explicit allocators
  • - No exceptions: errors are values, and every propagation is written at the call site
  • - defer and errdefer for cleanup
  • - Single-binary toolchain — no external assembler or linker to build an executable