The two pieces of programming jargon that cause me the most confusion are the words transparent and opaque. They are fairly commonly used, but I have never been fully clear on their meaning.
Google throws up plenty of examples of usage of the word 'transparent', like:
and also a bunch of results for 'opaque', mostly relating to C concepts:
although I've also seen the word used in contexts unrelated to C.
Leaving aside their use within specific compound terms like "opaque pointer", what meanings do the words transparent and opaque have within the sphere of programming? Are they even each other's opposites, like the visual concepts they metaphorically allude to, or are they unrelated to each other?
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.
Computer programs and procedures that are said to be transparent are typically those that the user is - or could be - unaware of.
Transparent Objects : If you are able to see clearly through an object, it is allowing light to pass through it and is transparent. For example :water,clear glass etc. Opaque Objects : If we cannot see through an object at all, it is an opaque object. For example: wooden door, wall etc.
"Opaque" is defined, in English, as "not able to be seen through; not transparent". In Computer Science, this means a value which reveals no details other then the type of the value itself.
In the examples you give, transparent is being used to mean hidden in the sense of things taking place automatically behind the scenes (i.e. without the user of the code or the program having to interact).
Opaque is also being used to mean hidden, which is perhaps where the confusion comes in. The term opaque type has a specific meaning in C/C++, where it refers to a type that has been declared but not yet defined.
In both cases, I think people are using these terms to express a lack of visibility. Transparent is used where something is present, but you can't see it. Opaque is used where something is present, but you can't see inside it to inspect its inner workings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With