# Defaults, named arguments, and overloads

Trailing parameters can have defaults, calls can name arguments after positional ones, and functions can overload on admitted signatures.

Last updated: 2026-09-09

Package: language | Status: stable

Tags: :, cpu, functions, language, yeho

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.

```yh
Name(Type value = default)
Name(positional, option: value)
```


## 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.

Verification: type checked

```yh
Move(text actor, int x, int y, bool animate = true)
{
    Console.Log(actor + " moved")
}

Move("Nova", 12, y: 7, animate: false)

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.language__parameters_calls"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/language--parameters-calls/complete-0 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Default parameters must trail required parameters.

After the first named argument, keep the remaining arguments named.

Source: yeho/docs/language/language-core.md §4.2; parser_expressions.cpp parseCallArguments

AI training permission: https://demonhunterlabs.com/ai-use
