private
Updatedstruct Counter read name: string private count: number = 0 end impl Counter function bump(self): number self.count += 1 return self.count end private function reset(self) self.count = 0 end end
A field or an impl method that only the struct's own methods reach. The word compiles to nothing at runtime: the check artifact keeps the private members out of the struct's public type, so c.count and c:reset() in other code are type errors in the editor and under alloy flux, and the private_access lint reports them in the same file. A private field with no default has to be set in new Counter { }, so that one stays; a private field that carries a default draws private_access when a new outside the impl names it. A struct with type parameters keeps one view. public is the default and needs no word.
