language · language ·

Defaults, named arguments, and overloads

Trailing parameters can have defaults, calls can name arguments after positional ones, and functions can overload on admitted signatures.

:cpufunctionslanguageyeho

Use defaults for the common case, named arguments where a call would otherwise hide meaning, and overloads only when the operations are truly the same idea.

Name(Type value = default)
Name(positional, option: value)

Status: stable

A readable call

Use defaults for the common case, named arguments where a call would otherwise hide meaning, and overloads only when the operations are truly the same idea.

cpu · language · type checked

Move(text actor, int x, int y, bool animate = true)
{
    Console.Log(actor + " moved")
}

Move("Nova", 12, y: 7, animate: false)
project.mech
manifestVersion = "2"
package = "api.example.language__parameters_calls"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

Default parameters must trail required parameters.

After the first named argument, keep the remaining arguments named.

yeho/docs/language/language-core.md §4.2; parser_expressions.cpp parseCallArguments