Skip to content

Glossary

This glossary provides a list of key terms and concepts related to the Mojo programming language, along with the locations in the Miji where they are discussed.

Term and conceptComments
variable
identifierA symbolic name that refers to a value in the program.
uninitialized variableA variable that has been declared but not yet assigned a value.
dunder methodA method whose name starts and ends with double underscores, e.g., __xxxx__(), used for special operations in Mojo.
shadowingTo declare a new variable with the same name as an existing one, effectively overwriting the original variable.
R-value and L-valueA value can be either an r-value or an l-value depending on their behaviors on the memory.
constructorA special method that initializes a new instance of a specific type.
offsetThe distance between the start of a data structure and a specific field within it, measured in the byte size of the data type (not the raw byte).
type checkerA tool in Python that statically checks the types of variables and expressions, and will warn you if there are type mismatches.
referenceAn alias (body double) of a variable that allows access to the original variable without copying it.
safe pointerA type that holds the address of a value in memory and the lifetime information of the owner. It is guaranteed to be safe to dereference.
Unsafe pointerA type that holds an address in memory. You can de-reference it to access the value at that address.
overloadingTo declare multiple functions with the same name but different arguments.
uninitializedA variable that has been declared but not yet assigned a value.
compile timeThe period when the Mojo code is translated into machine code.
run timeThe period when the compiled code is executed.
dereferencing operatorAn operator that accesses the value of a pointer. It is [] in Mojo.

Mojo Miji - A Guide to Mojo Programming Language from A Pythonista's Perspective · 魔咒秘籍 - Pythonista 視角下的 Mojo 編程語言指南