Content deleted Content added
typo "aris" to "arise" |
Iridescent (talk | contribs) m →Wrapping resources in objects: Typo fixing, typo(s) fixed: are use to → are used to using AWB |
||
Line 9:
Wrapping resources in objects is the object-oriented form of [[Encapsulation (computer programming)|encapsulation]], and underlies the dispose pattern.
Resources are typically represented by [[Handle (computing)|handles]] (abstract references), concretely usually integers, which are
These handles can be used directly, by storing the value in a variable and passing it as an argument to functions that use the resource. However, it is frequently useful to abstract from the handle itself (for example, if different operating systems represent files differently), and to store additional auxiliary data with the handle, so handles can be stored as a field in a [[Record (computer science)|record]], along with other data; if this in an [[opaque data type]], then this provides [[information hiding]] and the user is abstracted from the actual representation.
|