I’m aware of at least C# and haxe which have some special syntax to define a field and setter/getter in a special statement. Defining a public key like this makes it actually private and the setter/getter are public. If you define only a getter that way, it’s read only.
And as far as I remember, setter and getter are created in a transparent way, such that setting is done via assignment operator and getting without using parens, just the fieldname.