Appendix A: Keywords

In this chapter, we'll explore mana's reserved keywords and their meanings.

Appendix A: Keywords

The following is a list of keywords reserved by the Mana language.

Keywords Currently in Use

KeywordDescription
breakExit a loop immediately
constDefine a constant
continueSkip to the next loop iteration
deferExecute code when leaving scope
elseFallback for if and if let
enumDefine an enumeration
falseBoolean false literal
fnDefine a function
forLoop over items from an iterator
genericDefine generic type parameters
ifBranch based on a condition
implImplement functionality for a type
importImport items from another module
inPart of for loop syntax
letBind a variable
loopLoop unconditionally
matchMatch a value to patterns
moduleDefine a module
mutDenote mutability
NoneOption variant for no value
pubDenote public visibility
returnReturn from function
selfCurrent module or instance
SomeOption variant with a value
structDefine a structure
superParent module of current module
traitDefine a trait
trueBoolean true literal
typeDefine a type alias
useBring symbols into scope
whereDenote clauses that constrain a type
whileLoop while condition is true

Reserved for Future Use

KeywordPotential Use
asyncAsynchronous operations
awaitAwait an async operation
dynDynamic dispatch
externExternal code linking
macroDefine a macro
moveMake a closure take ownership
refBind by reference
staticGlobal variable or static lifetime
unsafeCode that requires manual safety verification
virtualVirtual dispatch
yieldGenerator yield