Uniform access principle

The uniform access principle of computer programming was put forth by Bertrand Meyer (originally in his book Object-Oriented Software Construction). It states "All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation."[1][2] This principle applies generally to the syntax of object-oriented programming languages. In simpler form, it states that there should be no syntactical difference between working with an attribute, pre-computed property, or method/query of an object.

While most examples focus on the "read" aspect of the principle (i.e., retrieving a value), Meyer shows that the "write" implications (i.e., modifying a value) of the principle are harder to deal with in his monthly column on the Eiffel programming language official website.[3]

  1. ^ Meyer, Bertrand (1997). Object-Oriented Software Construction (second ed.). Prentice Hall. p. 57. ISBN 978-0-13-629155-8.
  2. ^ "The UniformAccessPrinciple". c2 wiki. Retrieved 6 August 2013.
  3. ^ Meyer, Bertrand. "EiffelWorld Column: Business plus pleasure". Retrieved 6 August 2013.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search