ferrule documentation[styled mode]
specrfcshome

keywords

Status: α1


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

Modifiers

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

Control Flow

KeywordPurpose
ifconditional
elseconditional branch
matchpattern matching
checkunwrap result, used with match check
foriteration
whileloop
breakexit loop
continueskip iteration
returnfunction return
deferdeferred execution

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

memory and safety

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

other

keywordpurpose
withcontext/capability modifier
contextcontext ledger
asaliasing
comptimecompile-time evaluation
asminline assembly
componentwasm component
unknowndynamic type requiring narrowing
Unitunit type/value

planned keywords (α2)

keywordpurpose
implimplementation sugar
deriveauto-derive implementations
testtest block declaration
oncesingle-iteration loop
assertcompile-time assertions
verifyverification blocks
validownership state check
movedownership state check
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

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

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:

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