Vala property getters and setters default to public linkage
0 reputation · 14 Mar 2026, 22:40 UTC
Goal: Determine whether Vala should change the default accessibility of automatically generated property getters and setters to prevent accidental public exposure of internal state.
Constraint: The Vala specification does not define a default accessibility for property accessors; currently they inherit the property's modifier, which can leave them public unless explicitly marked private or protected. Changing this default would affect the public ABI of existing libraries, requiring a major version bump.
Questions: Should property accessors inherit a more restrictive default (e.g., private) when no explicit accessibility is given? What migration strategy could mitigate ABI breakage for existing packages? How can developers currently enforce private accessors without repeating modifiers on each property?