No, the above does NOT answer this question! I read that post twice before posting this. Folks seem to think I am asking what an optional is. I do know what an optional is, that's why I am using it as an example to clarify wrapper terminology. Let me simplify yet further:
//-----------------------------------------------------------
In the case of an optional:
Is the optional itself a wrapper? When you declare a variable to be an optional, are you wrapping it? I'll be satisfied with answers to these queries.
//-----------------------------------------------------------
Answers regarding unwrapping here [on SO] are [more] of the "how" and "why" type. I'd like to know exactly "what"! It's probably best if I pose this as a hypothetical that can be confirmed or corrected.
Using an optional as an example only, for the sake of elucidating exactly what a wrapper is.
Is this correct:
The optional, in this example, is the wrapper. This is equivalent to a "package" that could contain a value or nil. When you unwrap the optional, you are accessing the value within. To continue the metaphor, "unwwrapping is opening the package to reveal the contents within".
And is this also correct:
The wrapper is necessary because the underlying contents might be nil.
What is an example of another wrapper and what does it wrap?
edit: So how about one of you [luk2302, Eric D., Daniel Storm, Undo, Himanshu] tell me where this is answered?