Keywords

Keywords are reserved identifiers that have special meanings to the compiler. They can't be used as identifiers in your program

this article lists keywords.

Built-in Types

All keywords that can be used as a type.

Keywordshort Description
intan alias to int32
bytean alias to uint8
boolthe true or false type
uintptra unsigned int thats the size of a pointer.
sintptra signed int thats the size of a pointer.
floatAn 32 bit floating point number.
float32An 32 bit floating point number.
float64An 64 bit floating point number.
charan ASCII character type.
utf8an utf8 character type.
utf16an utf16 character type.
utf32an utf32 character type.
uint8an one byte unsigned int.
uint16an two byte unsigned int.
uint32an four byte unsigned int.
uint64an eight bytes unsigned int.
int8an one byte signed int.
int16an two byte signed int.
int32an four byte signed int.
int64an eight bytes signed int.
typeinforepresents compile type information.

type keywords

All keywords that can be used to make a type.

Keywordshort Description
enuma group of constants
traitshareing behavior between types
tagadd information about functions and classes
dynamicdynamically dispatched traits
functorFuncion Pointer/Lambda Object

memory keyword

All keywords that can that deals with memory.

Keywordshort Description
newallocate memory
dropfree memory.
unsafelets you do unsafe operations.
bitcastreinterpret the bytes of a type.
shrmake a shared pointer.
unqmake a unique pointer.

varable types keywords

All keywords that can that deals changes how a varable works.

Keywordshort Description
staticglobal variables
threadglobal variables but one per thread.
evalcompile time constant expression.

Compile Time Keywords

All keywords that can that lets you do stuff at compile time.

Keywordshort Description
compilerread compiler settings
invaildthrow a compile time error
typeget TypeInfo from an Type
typeofget TypeInfo from an expression
binduse TypeInfo as a type.
validcheck a statement has errors.

miscellaneous keywords

All keywords that dont fit in the other categories.

Keywordshort Description
forloop over a list of items
importimport a library
outa second output value.
panicthrow a runtime error.
deferthrow a runtime error.
useuse a namespace