# copy

Request an independent value binding

Last updated: 2026-09-09

Package: language | Status: experimental

Tags: cpu, keyword, language, memory, yeho

Use ordinary parameters by default, copy for an explicit independent value, original for an admitted source alias, and memoryAddress only at a reviewed low-level boundary.

```yh
copy
```


## Complete program

Pass an explicit copy so a helper can change its own record without replacing the caller’s value.

Verification: type checked

```yh
thing Profile { int level }
Change(Profile copy player)
{
    player.level = 9
}
Profile player = Profile()
player.level = 2
Change(player)
Console.Log(Text.From(player.level))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word__copy"
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/word--copy/complete --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Alias modes are restricted by type and target.

Task aliases are rejected. memoryAddress is not a general raw-pointer escape hatch.

Source: yeho/memory-lifetime-unsafe-2026.1.json; parser_types.cpp parseParameters

AI training permission: https://demonhunterlabs.com/ai-use
