language · keyword ·

delegate

Forward a method through a field

cpudatakeywordlanguageyeho

Prefer thing and ordinary functions for Kyber-ready programs. Use class and interface only while evaluating the explicit oracle route.

delegate

Status: generated-cpp-only

Complete program

Forward behavior to an owned identity object using an explicit method.

cpu · language · type checked

// Explicit forwarding is the readable alternative shown here.
class Identity
{
    Name() -> text { return "Nova" }
}
class Player
{
    Identity identity = Identity()
    Name() -> text { return this.identity.Name() }
}
Player player = Player()
Console.Log(player.Name())
project.mech
manifestVersion = "2"
package = "api.example.word__delegate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

Class and interface dispatch is generated-C++ only in Yeho Core 2026.1.

Generic classes and interfaces are not admitted even though the parser reserves research syntax.

yeho/docs/language/conformance-2026.1.json: class-and-interface-dispatch; parser_declarations.cpp