Reading through the Vala docs, I see there's a shorthand for defining a property:
public class Person : Object { public int age { get; set; default = 32; } } I tried to define a read-only variable by removing set; from the list, but I get a compilation error that the getter must be defined. I've resorted to using the longhand form:
public class Person : Object { private int _age = 32; public int age { get { return _age; } } } Is there a way to use the shorthand notation to with defining a setter?