4 ms·
> Removing the difference between accessing an attribute (variable) and invoking a method is a solid OO principle. It's called the Uniform Access Principle[1]
by adambyrtek 16y ago
> Removing the difference between accessing an attribute (variable) and invoking a method is a solid OO principle.
It's called the Uniform Access Principle[1] and the languages that don't take advantage of it often suffer from a getter/setter hell.
[1] http://en.wikipedia.org/wiki/Uniform_access_principle http://en.wikipedia.org/wiki/Uniform_access_principle
- anthonyb 16y agoEr, that's one of those false dichotomy thingos. It's quite possible to have something like properties in Python: http://www.python.org/download/releases/2.2.3/descrintro/#property http://www.python.org/download/releases/2.2.3/descrintro/#pr... Hey presto! Now you have the best of both worlds.