Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Ownership and Moves

Flint uses move semantics by default for non-trivial values.

That means assignment and passing a value to a function may transfer ownership instead of copying it.

Why Flint Uses Moves

The goal is memory safety without a garbage collector. Moves help the compiler prevent use-after-free style bugs and keep object lifetime explicit.

Copy Types

Primitive values and small explicitly copyable values can be copied normally. Larger or non-trivial values move unless the type says otherwise.

The Surface Language Stays Small

One of Flint’s design choices is that ownership exists without forcing safe code to spell everything with &, &mut, or explicit lifetime annotations.

That means the ownership model still matters, but the syntax remains smaller than many systems languages.