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

Keywords

This chapter groups the main Flint keywords by purpose. Each keyword has its own short section so the reference stays easy to scan.

Bindings

let

Creates an immutable binding.

let name = "flint"

mut

Marks a binding, parameter, or receiver as mutable.

mut count = 0

Flint uses mut to make mutation visible wherever it occurs.

Functions and Types

fn

Introduces a function or method.

struct

Defines a struct type with named fields.

enum

Defines a tagged union with named variants.

impl

Introduces methods attached to a type.

Modules and Visibility

use

Imports a module path into the file.

pub

Marks an item as visible outside the current module.

Control Flow

if

Branches on a condition.

else

Introduces the fallback branch for an if.

for

Introduces a counted or iterator-style loop. The frontend syntax exists today, but range lowering is still being finished.

in

Separates a for loop binding from the range or iterable it walks.

while

Repeats while a condition remains true.

loop

Repeats forever until an explicit exit such as break.

match

Branches on the shape of a value, especially enum variants.

return

Returns explicitly from a function.

Errors and Safety

defer

Schedules cleanup to run when the function exits.

unsafe

Marks an operation that escapes normal safety checks, such as direct volatile access or inline assembly boundaries.

Use unsafe for the smallest possible region and keep the reason obvious.

Logical Operators As Words

and

Logical conjunction.

or

Logical disjunction.

not

Logical negation.

Flint spells logical operators as words so bitwise and logical operations stay visually distinct.