Skip to content

Glossary

This glossary lists the core Mojo terms with short definitions.

TermDefinition
variableNamed storage (name, type, address, value) owning its value unless borrowed (See: Variables; Ownership; Copy & move; References)
identifierSymbolic name bound to a value/type/function (See: Variables)
uninitialized variableDeclared name without a valid value yet (See: Variables)
shadowingInner-scope variable hides an outer one (See: Variables)
dunder methodSpecial protocol method __name__ (e.g. __copyinit__) (See: Generics & Traits; Copy & move)
literalSource constant forming a value (See: Literals; Data types)
L-value / R-valueAddressable value vs temporary / literal (See: Literals; Copy & move)
constructorType-named creator / converter (See: Data types; Copy & move)
implicit copyAutomatic = copy for cheap types (See: Copy & move; Ownership)
implicit copyableConforming type enabling implicit copy (See: Copy & move)
implicit copy mechanismLanguage feature triggering auto copy (See: Copy & move)
explicit copy.copy() producing a new independent value (See: Copy & move; Ownership)
deep copyCopy duplicating nested / heap data (See: Copy & move; Composite)
move / transferOwnership hand-off via ^ (See: Copy & move; Ownership)
move-capable typeType whose values can be moved with ^ (See: Copy & move; Ownership)
transfer operator ^Symbol marking ownership move (See: Copy & move; Ownership)
ownershipOne-owner model ensuring safety (See: Ownership; Lifetimes)
ownerUnique controller of a value lifetime (See: Ownership; Lifetimes)
owner destructionEnd of owner lifetime releasing value (See: Ownership; Lifetimes)
borrowNon-owning access (reference or pointer) (See: Ownership; References; Lifetimes)
borrowerAny reference or pointer without ownership (See: Ownership; References)
reference (alias)Same-type same-address alias (See: References; Ownership)
aliasAlternate name to same value (See: References)
mutable referenceAlias permitting mutation (See: References)
immutable referenceRead-only alias (See: References)
safe pointerPointer with target + origin metadata (See: References; Ownership)
unsafe pointerPointer lacking lifetime tracking (See: References; Ownership)
dereferencing operator[] to access pointee (See: Ownership; References)
isolated statusIndependent owned value (See: Ownership)
referenced statusAlias-based access (See: Ownership)
pointed statusIndirect through safe pointer (See: Ownership)
unsafe statusAccess via unsafe pointer (See: Ownership; References)
unsafe codeCode using unchecked constructs (See: Ownership)
dangling pointerPointer to freed / reused memory (See: Ownership; References; Lifetimes)
dangling referenceAlias used after owner ended (See: Ownership; References; Lifetimes)
memory leakLost allocation unreleased (See: Ownership)
double freeDuplicate deallocation attempt (See: Ownership)
accidental overwritingUnintended mutation (See: Ownership)
lifetimeValid duration of a value (See: Lifetimes; Ownership)
lifetime annotationSyntax tying borrower to origin (See: Lifetimes; References)
originSource owner metadata (See: Lifetimes)
origin chainLinked borrowing lineage (See: Lifetimes)
parametric mutabilityMutability encoded as parameter (See: References; Parameterization)
compile timeStatic analysis & validation phase (See: Ownership; Parameterization)
run timeExecution phase for values (See: Ownership)
SIMDFixed-size homogeneous vector (See: SIMD; Parameterization)
SIMD laneSingle element position (See: SIMD)
parameterizationCompile-time specialization (See: Parameterization; Generics & Traits)
parameterCompile-time argument in [] (See: Parameterization; Generics & Traits)
genericTrait-constrained polymorphic pattern (See: Generics & Traits; Parameterization)
generic functionFunction with trait-bounded type params (See: Generics & Traits)
traitBehavioral contract (See: Generics & Traits)
conformanceMeeting all trait requirements (See: Generics & Traits)
default implementationTrait-provided method body (See: Generics & Traits)
implicit trait conformanceNaming-based satisfaction (See: Generics & Traits)
trait placeholder ...Ellipsis marking requirement (See: Generics & Traits)
overflowInteger wrap-around (See: Data types)
BigIntArbitrary-precision integer (See: DeciMojo)
stackFast scoped fixed-size storage (See: Layout; Ownership)
heapDynamic allocation region (See: Layout; Ownership)
contiguous memorySequential addresses (See: Layout; Composite)
metadata (list)Header: pointer, length, capacity (See: Composite; Layout)
capacity (list)Reserved element slots (See: Composite)
list element layoutConsecutive element storage (See: Composite; Layout)
StringLiteralImmutable inline string form (See: String; Copy & move)
materialization (string)Converting to mutable String (See: String; Structs)
stack vs heap optimization (String)Small-string inline optimization (See: Structs; String)
vault metaphorVariables as vaults at addresses (See: Ownership)

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