Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by int_19h on Sunday January 19, 2020 @03:25PM
(#22093781)
Even when it's not enforced by the language, it can be something enforced as part of the coding style by the team - that Foo vs GetFoo() indicates presence of side effects, or potentially expensive computation.
In Ruby, as is also true in many languages that have a syntactic distinction, setting a property is always ultimately calling a method, so the distinction is illusory. What you may want is a purity guarantee (well, that getters are pure and than setters have no effects except on the state specifically backing the property, but the latter gets complicated to apply to nontrivial properties), but most languages that let you distinguish whether properties or methods are exposed in an API don't provide a that kind of guarantee with properties, either, just more boilerplate code to implement them.
And the whole point of properties over exposed data members is to abstract behavior so that implementation changes don't change APIs.