O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Representational Encapsulation

Data types do not tell the full story of the representation either. Although much of the discussion about object-oriented design is in the direction of structure and syntax—the mechanics of encapsulation—you can make a strong case that meaning is the most important aspect. The purpose of an object and its characteristics need to be at the forefront of your mind as you design and use them. Ideally, the object design guides you toward the correct usage, but mainstream programming languages currently have little provision to encode full semantic intent.

With respect to the usage of an object, all of this protects us from creating objects with inconsistent internal state and provides the object’s implementation avenues ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required