VOID Language object model

Familiar object semantics.
One coherent model.

VOID's object model is designed to behave like one system. Construction, inheritance, interfaces, virtual dispatch, delegates, events, and generic contracts are resolved by the same compiler rules and continue to work when value types and GC enter the picture.

Completed object-model foundation

Built to work together, not as isolated syntax.

Rather than validating each feature in isolation, the compiler is exercised through normal multi-file programs where construction, dispatch, generic contracts, value/reference boundaries, and GC all interact. The goal is predictable composition, not a syntax checklist.

Constructor chains

Derived constructors can select base constructors with : base(...), while same-type constructors can delegate through : this(...). Delegation preserves the intended initializer and constructor ordering.

Interface inheritance

Interfaces can inherit other interfaces, and a concrete value exposes the combined inherited contract through normal assignment and dispatch.

Static interface contracts

Interfaces can require public static properties and events without owning storage. Classes or structs satisfy those contracts with matching static members, including inherited and diamond-interface cases, while access remains through the implementing type.

Struct interfaces

Structs can implement interfaces and box into managed interface values. Boxed struct values remain valid through normal GC paths.

Virtual properties

Virtual, abstract, and override properties dispatch through base references using the same object-model rules as other virtual members.

Events

Instance events, static events, interface event contracts, static interface event contracts, declaration-time event initializers, subscription/removal, static initialization, managed event roots, and exception propagation through event dispatch compose normally.

Delegate completion

Delegates support struct instance-method targets with captured value-copy semantics, by-reference parameters, structural equality for single and multicast delegates where appropriate, and normal exception propagation through invocation.

Conditional expressions

Target-typed ?: works across class/interface values, boxed structs through interface targets, delegates, nullable values, conversions, and generic contexts while preserving single evaluation.

GC-aware composition

Interface values, delegates, event targets, boxed structs, and the surrounding object graph are validated together instead of relying only on isolated feature tests.

Static interface methods

Interfaces can require public static methods as compile-time contracts. Concrete classes and structs provide ordinary static implementations without interface-owned storage.

Constrained static dispatch

Generic code can call required static interface members through a constrained type parameter, then monomorphization resolves the call to the concrete static implementation.

Default interface methods

Interface methods may provide bodies. Concrete implementations win; inherited defaults act as fallbacks; ambiguous inherited defaults receive focused diagnostics.

Representative composition

One object can participate in the whole model.

A real type rarely uses one language feature at a time. A game object might inherit behavior, satisfy interfaces, publish events, use generic helpers, and cross interface/value boundaries in the same frame. VOID's object model is tested around that kind of composition so adding one abstraction does not silently change another.