Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by gunn on Sunday January 19, 2020 @05:23AM
(#22090589)
In ruby you are always calling a method, you can't access a property from outside a class with normal syntax.
[ Parent
| on HN ]
Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by dragonwriter on Sunday January 19, 2020 @01:16PM
(#22092889)
Ruby doesn't have properties except as an alias for a certain pattern of methods, and in languages that do have properties they are almost invariably just a layer over calling getter and setter methods.
You seem to confusing “properties” with “data members” which, it is true, Ruby does not permit external access to except via method calls. But properties are a way of calling methods with a syntax that looks like direct member access, not actual direct member access.