4 ms·
The uniform access principle is that features are "available through a uniform notation, which does not betray whether they are implemented through storage or t
by edflsafoiewq 6y ago
The uniform access principle is that features are "available through a uniform notation, which does not betray whether they are implemented through storage or through computation"; it doesn't imply anything about what the uniform notation is. Java-style getters/setters also achieve the uniform access principle; everything is accessed only via get_X()/set_X() and never a raw field .X that would betray it was implemented through storage.
- augustk 6y ago"Although it's a fundamental feature of object-oriented programming, remarkably few OO languages really follow it. (Eiffel is naturally an exception.) Most languages simulate it by convention, hence the habit of using accessors such as getAge in Java and C++ programs." https://martinfowler.com/bliki/UniformAccessPrinciple.html https://martinfowler.com/bliki/UniformAccessPrinciple.html