When you all write your classes, and you want to expose certain elements of your class to outside parties etc. Do you generally use getter/setters or public functions?
To me a getter/setter is for adjusting a property of your class where as a method is more for say adjusting its behaviour state. For instance, a method called classInstance.play() that plays a video file makes more sense than say a setter classInstance.play = true.
But then, in some cases the distinction is less defined. For instance, changing the volume of something, volume is a property, and seems to fit with a getter/setter pair well: classInstance.volume = .1 as opposed to classInstance.volume(.1).
I guess its a matter of style, but are there any ‘hard and fast’ rules about when to use a getter/setter verses when to use a public method?
(I realise that getters/setters are also public)