# get

Allow property reading

Last updated: 2026-09-09

Package: language | Status: experimental

Tags: cpu, data, keyword, language, yeho

Use fields for direct data. Use a property when read or write policy is part of the object's contract and you accept its experimental status.

```yh
get
```


## Complete program

Model a player profile with explicit member access and property shapes. This class example uses the CPU oracle.

Verification: type checked

```yh
class Profile
{
    public text displayName = "Nova"
    private int secret = 7
    protected int rank = 1
    internal int region = 2
    readonly text id = "player-1"
    int level { get; set; }
    text createdBy { get; init; }
}
Profile player = Profile()
player.level = 3
Console.Log(player.displayName)
Console.Log(Text.From(player.level))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word__get"
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--get/complete --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Properties require get and cannot combine set with init.

Computed property bodies are unavailable; current properties describe access shape.

Source: yeho/parser_declarations.cpp parseThingMemberModifiers and parseThingPropertyAccessors; conformance properties

AI training permission: https://demonhunterlabs.com/ai-use
