Opaque Types: Data Structures with Full Encapsulation

Partial Revelation of object types in Modula-3 gives you fine-grained control over the visibility of fields of your objects to various clients. Partial Revelations are a generalization of the private/public/protected/friend model enforced by other languages. In this example, the Person interface exports a partially opaque type Person.T.

For more information on opaque types, see the language specification.