Xenon language
Documentation
Language concepts, syntax and behavior.
Language foundation
Core
Foundations
Source files
File format, encoding and comments.
Read chapter → BuildProject files (.xeproj)
Configure compilation inputs, build profiles, project references and libraries.
Read chapter → BuildConditional compilation
Select declarations and statements with target, profile, project and CLI defines.
Read chapter → LibrariesXELIB libraries
Build and consume source-free Xenon semantic libraries for a selected target ABI.
Read chapter → WorkspaceWorkspace files (.xws)
Open multiple projects together without changing their dependency graph.
Read chapter → SymbolsNamespaces
Organize declarations across one or more files.
Read chapter →Language
Primitive types
Integers, floating-point values, booleans and void.
Read chapter → ValuesLiterals and variables
Create values and store them in typed local variables.
Read chapter → Mutabilityconst and readonly
Separate compile-time constants from runtime read-only access.
Read chapter → DeclarationsFunctions
Free functions, parameters, calls, return values and the entry point.
Read chapter → Control flowAwait and resumable functions
Library-defined suspension, completion and continuation lifetimes.
Read chapter → VisibilityAccess modifiers
Control which functions and struct members are visible to other code.
Read chapter → ExpressionsOperators
Arithmetic, comparison, boolean, bitwise and assignment operators.
Read chapter → Type behaviorOperator overloading
Every supported unary/binary operator, conversions, compound assignment and declaration restrictions.
Read chapter → ConcurrencyAtomic values
Indivisible primitive reads, writes and read-modify-write operators.
Read chapter → ConcurrencyThread-local storage
Per-native-thread static fields with lazy initialization and normal ownership cleanup.
Read chapter → ConcurrencyMemory model and data races
Ordinary and atomic access rules, undefined races, ownership and synchronization boundaries.
Read chapter → StatementsBranching
Select a path with if, else and switch over integer or enum values.
Read chapter → IterationLoops
Repeat work with while and for, then control iteration explicitly.
Read chapter → Control flowExceptions
Throw typed values, handle them with catch and guarantee cleanup with finally.
Read chapter →Type system
Structs
Define structured types, choose stack or heap storage and add behavior.
Read chapter → InitializationConstructors
Initialize instances, select overloads and construct base types before derived fields.
Read chapter → CleanupDestructors
Release resources, chain base cleanup and destroy array elements.
Read chapter → OwnershipMove semantics
Transfer a local value and its deterministic cleanup responsibility explicitly.
Read chapter → Single ownershipunique ownership
Hold exclusive ownership of a heap allocation, transfer it with move and release it automatically.
Read chapter → Reference-counted ownershipshared and weak ownership
Share an allocation safely, observe it weakly and upgrade observers with the lock expression.
Read chapter → Low-level lifetime controlstorage and pin
Construct values in typed storage, control destructor responsibility and guarantee stable addresses.
Read chapter → Named valuesEnums
Define distinct integer-backed types with named constant values.
Read chapter → RelationshipsInheritance
Extend one struct, initialize its base and preserve layout compatibility.
Read chapter → ContractsInterfaces
Describe behavior and dispatch through interface references.
Read chapter → GenericsGeneric templates
Use compile-time generic declarations, constraints and structural contracts.
Read chapter → PolymorphismAbstraction and virtual dispatch
Define virtual behavior, abstract requirements and concrete overrides.
Read chapter → Type membersStatic members
Store shared state and call behavior through a struct type.
Read chapter → AccessorsProperties and indexers
Expose controlled member and indexed access through getters and setters.
Read chapter → AliasingReferences
Alias existing values with mutable or readonly typed access.
Read chapter →Low-level programming
Arrays
Use rectangular and jagged arrays, query dimensions and manage storage.
Read chapter → MemoryRaw pointers
Take addresses, dereference memory and access pointed-to values.
Read chapter → ConversionsCasts
Express numeric conversions explicitly.
Read chapter → LifetimeManual memory
Allocate native storage and release it explicitly.
Read chapter → Target ABIType layout
Query size, alignment and field offsets.
Read chapter → Interopextern, export and C ABI
Native symbols, library builds, linking and C-compatible function signatures.
Read chapter →