ferrule

keywords

α1
declaration-keywordscontrol-flow-keywordstype-keywords

keywords


Reserved Keywords (α1)

These identifiers are reserved and cannot be used as variable, function, or type names:

Declarations

KeywordPurpose
constimmutable binding
varmutable binding
functionfunction declaration
typetype alias/definition
errorerror type declaration
domainerror domain declaration
capabilitycapability declaration
implimplementation block

Modifiers

KeywordPurpose
inoutby-reference parameter
exportpublic symbol
importmodule import
packagepackage declaration
usemodule-level defaults
effectseffect declaration
capcapability parameter
pubpublic visibility
opaqueopaque type modifier

Control Flow

KeywordPurpose
ifconditional
elseconditional branch
matchpattern matching
checkunwrap result, used with match check
foriteration
whileloop
breakexit loop
continueskip iteration
returnfunction return
deferdeferred execution
scopescoped effect handler block
oneffect handler clause in scope blocks
propagatere-raise an effect in a handler
retryre-enter a scope block

Error Handling

KeywordPurpose
oksuccess construction
errerror construction
checkunwrap or propagate
ensureguard clause

Type System

KeywordPurpose
wheretype constraints/refinement
istype narrowing
incontravariant
outcovariant
infertype inference in conditionals
mapmapped types
distributedistributive conditional

Compile-Time

KeywordPurpose
comptimecompile-time evaluation
whenconditional compilation block

Memory and Safety

KeywordPurpose
unsafeunsafe block
moveexplicit ownership transfer
copyexplicit copy annotation
cloneexplicit clone
staticstatic allocation

Other

KeywordPurpose
withcontext/capability modifier
contextcontext ledger
asaliasing
asminline assembly
componentwasm component
unknowndynamic type requiring narrowing
Unitunit type/value

Planned Keywords (α2)

KeywordPurpose
deriveauto-derive implementations
testtest block declaration
packedpacked struct layout
externc-compatible struct layout
transmutebit reinterpretation

Removed Keywords

These were in earlier drafts but are not in α1:

RemovedReason
rolereplaced by record-based polymorphism
traitnever used
selffunctions use explicit first parameter
fnuse function for all functions
===use == for equality (no triple equals)
!==use != for inequality
nulluse None variant of Maybe<T> instead
unsafe_castreplaced by unsafe block + transmute
error (as function clause)replaced by fail<E> in effects; error keyword still used for error type declarations

Contextual Keywords

Some identifiers have special meaning only in specific contexts:

IdentifierContextMeaning
selfrefinement where clausethe value being refined
toview.move, view.copydestination parameter
usingmap_errortransform function
volatileinline assemblyprevent optimization
clobberinline assemblyregister clobber list
mutView<mut T>mutable view
faileffects list fail<E>fallible effect
suspendeffects listsuspension effect
yieldgenerator functionsyield a value
parallelscope block kindparallel execution
racescope block kindfirst-to-finish execution
blockingscope block kindblocking scope
timeoutscope block kindtimeout-bounded scope
transactionscope block kindtransactional scope

These can still be used as regular identifiers outside their special contexts.


Literals

LiteralType
trueBool
falseBool
UnitUnit type value

Note: None is not a literal but a union variant constructor for Maybe<T>. Use None directly when constructing optional values: const x: u32? = None;


Operators as Keywords

These are operators, not keywords, but are reserved:

+ - * / %
& | ^ ~ << >>
&& || !
== != < <= > >=
++ 
-> =>
...

On this page