← back

Coming from Rust

If you know Rust, tape will feel familiar in its philosophy — explicit, no hidden costs, errors are values. The difference is tape trades some compile-time guarantees for simpler ergonomics.

ownership & borrowing

Rust

Borrow checker, lifetimes, &/&mut, Clone/Copy traits. Compile errors for aliased mutation.

Tape

Managed types (strings, structs holding them) deep-copy on assignment and move on return. Compiler inserts the drops at scope exit. No borrow checker — share explicitly through pointers.

generics & traits

Rust

fn foo<T: Display>(x: T) — type parameters, trait bounds, monomorphization, impl blocks.

Tape

@tape fn gen(T: type) — run code at compile time to generate specialized types/functions. Explicit, debuggable, no inference.

error handling

Rust

Result<T, E>, ? operator, From trait for error conversion.

Tape

T or E, or return to propagate, or { } to handle. Same concept, less syntax.

concurrency

Rust

Send/Sync traits, async/await, tokio/async-std, Arc<Mutex>.

Tape

Actor-model worker threads. Typed channels (emits). No async/await — explicit thread boundaries, no colored functions. Designed; not yet implemented.

what stays the same

  • - No garbage collection (t0/t1)
  • - Errors are values, not exceptions
  • - Explicit over implicit everywhere
  • - Enums / tagged unions with exhaustive match
  • - Zero-cost abstractions as a design value