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
本文深入探讨了计算机科学中不透明数据类型的定义、特点和常见应用,解释了其如何实现信息隐藏,并通过实例说明了不透明数据类型在抽象数据类型实现中的作用。

3万+

被折叠的 条评论
为什么被折叠?



