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 concept | Comments |
---|---|
variable | |
identifier | A symbolic name that refers to a value in the program. |
uninitialized variable | A variable that has been declared but not yet assigned a value. |
dunder method | A method whose name starts and ends with double underscores, e.g., __xxxx__() , used for special operations in Mojo. |
shadowing | To declare a new variable with the same name as an existing one, effectively overwriting the original variable. |
R-value and L-value | A value can be either an r-value or an l-value depending on their behaviors on the memory. |
constructor | A special method that initializes a new instance of a specific type. |
offset | The 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 checker | A tool in Python that statically checks the types of variables and expressions, and will warn you if there are type mismatches. |
reference | An alias (body double) of a variable that allows access to the original variable without copying it. |
safe pointer | A 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 pointer | A type that holds an address in memory. You can de-reference it to access the value at that address. |
overloading | To declare multiple functions with the same name but different arguments. |
uninitialized | A variable that has been declared but not yet assigned a value. |
compile time | The period when the Mojo code is translated into machine code. |
run time | The period when the compiled code is executed. |
dereferencing operator | An operator that accesses the value of a pointer. It is [] in Mojo. |