Opaque data type--不透明类型

Opaque:对使用者来说,类型结构和机制明晰即为transparent,否则为Opaque

 

In computer science, an opaque data type is a data type whose concrete data structure is not defined in an interface. This enforces information hiding, since its values can only be manipulated by calling subroutines that have access to the missing information. The concrete representation of the type is hidden from its users, and the visible implementation is incomplete. A data type whose representation is visible is called transparent.[1] Opaque data types are frequently used to implement abstract data types.

Typical examples of opaque data types include handles for resources provided by an operating system to application software. For example, the POSIX standard for threads defines an application programming interface based on a number of opaque types that represent threads or synchronization primitives like mutexes or condition variables.[2]

 

 

https://en.wikipedia.org/wiki/Opaque_data_type

转载于:https://www.cnblogs.com/feng9exe/p/10572509.html

你可能感兴趣的:(Opaque data type--不透明类型)