{"id":"word--protected","name":"protected","owner":"yeho","package":"language","kind":"keyword","signature":"protected","description":"Expose through inheritance","context":"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.","parameters":[],"returns":"","members":[],"tags":["cpu","data","keyword","language","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"parser_declarations.cpp parseThingMemberModifiers and parseThingPropertyAccessors; conformance properties"},"status":"experimental","notes":["Properties require get and cannot combine set with init.","Computed property bodies are unavailable; current properties describe access shape."],"examples":[{"id":"complete","title":"Complete program","description":"Model a player profile with explicit member access and property shapes. This class example uses the CPU oracle.","code":"class Profile\n{\n    public text displayName = \"Nova\"\n    private int secret = 7\n    protected int rank = 1\n    internal int region = 2\n    readonly text id = \"player-1\"\n    int level { get; set; }\n    text createdBy { get; init; }\n}\nProfile player = Profile()\nplayer.level = 3\nConsole.Log(player.displayName)\nConsole.Log(Text.From(player.level))\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.word__protected\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"958e2a1d701244658473e0cd6d208c92252ef5c49ea43cdf429e984ee811ac53","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=word--protected","json":"https://demonhunterlabs.com/reference/items/word--protected.json","markdown":"https://demonhunterlabs.com/reference/text/word--protected.md"}
