Language + runtime

A complete language core.

VOID is meant to feel like a practical managed language for games, not a collection of isolated syntax features. Its object model, value semantics, cleanup, threading, GC, native boundary, and tooling are designed to share the same compiler and runtime rules.

Language & runtime

Features that compose into normal game code.

Features matter most when they survive real composition. VOID focuses on consistent behavior when generics, GC, exceptions, iterators, native calls, and concurrency meet in the same program instead of treating each feature as its own island.

Object model & generics

Current Classes, nested/readonly structs, inheritance, constructor chaining/delegation, interface inheritance, struct interface implementation/boxing, static interface property/event contracts, virtual/abstract/override properties, generic types/methods with class/struct/base/interface/new()/unmanaged constraints, explicit generic calls through arbitrary receivers, delegates, nested/by-reference closures, custom and field-like events, attributes, and runtime discovery.

Collections & iteration

Current Single-dimensional, jagged, and rectangular arrays with inferred rectangular initializer shapes; List<T>, Queue<T>, Stack<T>, Dictionary<TKey,TValue>, HashSet<T>; foreach, enumerators, and iterator state machines with ordinary inferred/definitely-assigned/shadowed locals.

By-reference & contiguous memory

Current Compiler-tracked refs and stack-only ref structs underpin Index, Range, Span<T>, ReadOnlySpan<T>, managed array-backed Memory<T>/ReadOnlyMemory<T>, range slicing, normal/ref/ref-readonly Span enumeration, and overlap-safe CopyTo/TryCopyTo/Fill/Clear. Array ranges allocate copies while Span ranges remain views.

Unmanaged generic storage

Current where T : unmanaged uses one recursive unmanaged-type classification across generic types and methods. Proven unmanaged T can participate in unsafe T*, valid pointer arithmetic, sizeof(T), and stackalloc T[count] through the existing pointer and stack-allocation machinery.

Scoped pinning & native views

Current fixed pins managed storage through structured cleanup, keeps the owner rooted, evaluates structural pinnable receivers once, and prevents the scoped pointer from pretending its backing is permanently pinned. Arrays, Span, ReadOnlySpan, Memory, and ReadOnlyMemory share that pinning model, while unsafe pointer+length construction creates non-owning Span views over unmanaged storage.

Native heap & function pointers

Current Explicit NativeMemory allocation, free, reallocation, aligned allocation, and typed unmanaged storage remain outside the managed GC and keep ownership manual. Real native function-pointer values are unmanaged, can participate in ABI-compatible indirect calls and function tables, and stay distinct from managed delegates and captured closures.

UTF-8 strings & text construction

Current string is one immutable GC-managed UTF-8 reference type with validated scalar values, embedded NUL support, scalar-based Length/indexing/ranges/enumeration, ordinal search/editing, concatenation, and deterministic primitive formatting. ByteLength keeps storage size explicit, while StringBuilder and interpolation provide efficient construction without introducing a second ordinary text type.

Standard IO & interactive Console

Current Console input/output is ordinary StandardLibrary behavior layered over reusable readers, writers, streams, encoding, and redirection. Character input follows VOID's Unicode-scalar text model, while key handling, Ctrl+C policy, colors, cursor state, and other terminal controls keep host-specific work at the narrow platform boundary.

Rich compiler diagnostics

Current Compiler-owned diagnostics combine precise source excerpts with stable VOIDxxxx families, notes, confident help, related locations, conservative parser recovery, and optional JSON records. Text and machine output are two views of the same structured diagnostic information.

Runtime developer diagnostics

Current Runtime failures can present a VOID source excerpt before a complete synchronous VOID call stack. Throw/rethrow origins and known VOID frames are preserved, while missing-source, published-build, native-boundary, process-exit, and launch-failure cases remain explicit instead of being forced into a fabricated stack model.

Value-type semantics

Current Nested value structs, readonly struct, readonly instance methods/accessors, calls through in, value copying/defaults, generic/nullable/static value layouts, and recursive GC tracing through managed references inside nested structs.

Closure & iterator completion

Current Nested lambdas, per-iteration foreach capture frames, ref/out/in captures and lambda parameters, struct this capture, and iterator state across foreach, switch, nested loops, base-member access, and suspension.

Compound assignment targets

Current Compound assignment through indexers and writable vector swizzles preserves single evaluation of receivers, indices, and right-hand sides.

Nullable value types

Current Native non-boxed T? storage, HasValue/Value, nullable fields/properties/arrays/generics, nullable enums/structs, and GC tracing through nullable structures containing managed references.

Nullable operators

Current Lifted arithmetic/comparisons, ??, ??=, value-returning ?., and null-conditional indexing with ?[].

Conversion semantics & generic conversions

Current One semantic conversion engine classifies standard conversions, resolves user-defined implicit/explicit conversions, lifts through nullable values, serves target-typed sites, validates static-interface conversion contracts, and authorizes constrained generic implicit/explicit dispatch with provenance preserved through specialization, iterators, closures, and GC.

Named arguments & defaults

Current Named argument reordering, optional/default parameters, params, default(T), and target-typed default across locals, returns, arguments, fields, properties, generics, enums, pointers, structs, and nullable values.

Instance & object initialization

Current Instance field and auto-property initializers run before constructor bodies, while object initializers apply normal accessible field/property assignments after one construction.

Collection construction

Current Contextual array initializers and target-typed collection expressions support empty forms and spreads, then route arrays, Span<T>/ReadOnlySpan<T>, List<T>, and compatible custom collections through ordinary conversions and existing collection construction mechanisms.

Static members & type initialization

Current Static fields/properties, static readonly, static constructors, before-first-use run-once initialization, base-before-derived ordering, generic static state, and GC roots for managed static references.

Type-qualified static API foundations

Current Ordinary, qualified, constructed-generic, and built-in types now resolve static values, properties, methods, method groups, and generic calls through one type-receiver model. Source-owned scalar parsing, value-type static properties, and EqualityComparer<T>.Default use that general mechanism instead of member-specific compiler branches.

Core ergonomics

Current Enums, switch, const/readonly, casts, is/as, null operators, optional parameters, typeof, runtime type metadata, and user-defined implicit/explicit conversions.

Inline out variables

Current Typed declarations such as out int age and inferred declarations such as out var age participate in ordinary overload resolution, generic inference, scope, definite assignment, short-circuit flow, shadowing, discards, diagnostics, and tooling.

Control & member surface completion

Current Post-test do/while loops, expression-bodied methods/constructors/operators/conversions/setters, and custom event add/remove accessors all lower through the same existing semantic and code-generation paths.

Exceptions & runtime control flow

Current Managed Exception types, throw, typed and catch-all catch, cross-call propagation, GC-safe unwinding, finally, structured return/break/continue through cleanup, nested handlers, bare rethrow, iterator/delegate/event integration, native/library boundaries, and static-initializer recovery now compose through one runtime-control-flow model.

Managed threading, Tasks & synchronization

Complete Concurrency is part of the managed runtime rather than a detached native layer. Direct threads and ThreadPool workers participate in GC coordination, while Tasks reuse the same waits, faults, cancellation, synchronization, closures, generics, and native-boundary rules. Interlocked and Volatile keep atomic access and publication inside that same model.

Generalized awaitables & ValueTask

Complete await binds structurally through GetAwaiter(), IsCompleted, OnCompleted(Action), and GetResult(). Task now participates through TaskAwaiter instead of a private compiler path; generic, struct, and extension awaiters share the same lowering. Task.Yield provides an allocation-free yield awaitable, while ValueTask/ValueTask<T> provide true value-type completed paths and Task-backed asynchronous paths, including async ValueTask methods.

Async lambdas & structured async disposal

Complete Async lambdas target Task/Task<T>/ValueTask/ValueTask<T>-returning delegates and reuse the ordinary async state-machine machinery, including captures, generics, GC roots, faults, cancellation, and custom awaiters. await using resolves DisposeAsync() structurally through the generalized awaiter binder and keeps asynchronous cleanup inside the same structured control-flow model.

Task composition

Complete Task completion factories cover already-completed, result, faulted, and canceled states. Async Task.Run overloads unwrap Task-returning delegates without blocking workers, while Task.WhenAll and Task.WhenAny compose completion through continuations with normal result, fault, cancellation, race, and GC behavior.

Async timing & cancellation composition

Complete One shared monotonic timer queue powers Task.Delay, delayed cancellation through CancellationTokenSource.CancelAfter, and timeout-aware Task.WaitAsync without sleeping ThreadPool workers or creating one thread per timer. CancellationTokenSource is disposable, linked sources unregister from their parents deterministically, and canceled or timed-out WaitAsync proxies never mutate the antecedent Task.

Async enumeration & iterators

Complete IAsyncEnumerable<T>, IAsyncEnumerator<T>, await foreach, and async iterator producers share the existing async and iterator state-machine machinery instead of introducing a third runtime path. Their asynchronous cleanup composes with the same IAsyncDisposable, generalized awaiter, and structured lifetime rules used by await using.

Array surface completion

Current Null-conditional indexing works across single-dimensional, jagged, and rectangular arrays. Rectangular initializers support explicit compile-time dimensions as well as new[,]-style inferred dimensions while preserving shape validation, conversions, row-major evaluation, and GC safety.

Conditional expressions

Current Target-typed ?: expressions compose with interface/reference values, structs through interface targets, delegates, nullable values, user conversions, generics, and single-evaluation semantics.

Reusable library projects

Current Projects can emit native static archives, export public static VOID methods with stable C symbols, preserve static initialization/GC roots across repeated calls, and be consumed from VOID or plain C through the existing native ABI.

Receiver & generic call completion

Current Instance methods can be called through constructor/method/property/indexer/array/conditional/temporary receivers with single evaluation and GC safety. Explicit generic calls work through static, instance, inherited, virtual, interface, specialized-generic, and temporary receiver paths.

Deterministic lifetime & using

Complete IDisposable, generated iterator disposal, non-array foreach cleanup, using (...), and using var share the same structured cleanup machinery used by finally, including early exits and exceptions.

Inference, extensions & interface abstractions

Complete Generic method type inference, extension methods, static interface method contracts, constrained static calls through type parameters, and default interface methods reuse the existing overload, monomorphization, and interface-dispatch systems.

Pattern matching & switch expressions

Complete Declaration/type, constant/null, relational, logical, property, and recursive patterns compose with flow-aware locals, deterministic pattern-switch ordering, when guards, and target-typed switch expressions.

Operators & constrained generic math

Complete User-defined unary and binary operators use normal overload/conversion resolution, static interfaces can require operators, and constrained generic code dispatches those operators through monomorphized concrete implementations. Iterator lowering preserves generic constraint provenance across yield.

Managed runtime

Current Garbage collection traces managed references across objects, inheritance, interfaces, nullable structures, collections, iterators, delegates, closures, events, static roots, and every registered managed thread. Cooperative safepoints and native-quiescent states coordinate stop-the-world collection without losing worker roots.

Unsafe & native interop

Current Pointers, unmanaged generic pointer/stack storage, scoped managed pinning, unsafe pointer+length Span views, explicit native heap ownership, native ref/out/in, managed delegate callbacks, raw native function pointers, indirect ABI calls, aliases, local native dependencies, and reusable VOID static-library output all reuse the existing C ABI boundary.

Compiler tooling

The compiler owns both language intelligence and diagnostic context.

voidc check, terminal diagnostics, JSON diagnostics, and the LSP all consume compiler-owned source and semantic information. Rich CLI diagnostics add stable codes, excerpts, notes, help, related locations, and recovery without creating a parallel error system, while hover, signatures, completion, navigation, references, symbols, and synchronized multi-file editor state continue to use the same compiler model.