Miranda optUncall

From Erights

(Difference between revisions)
Jump to: navigation, search
(describe optUncall)
(import javadoc)
 
Line 1: Line 1:
'''__optUncall/0''' is a [[Miranda message]] which may return a [[portrayal]] of the object receiving it.
'''__optUncall/0''' is a [[Miranda message]] which may return a [[portrayal]] of the object receiving it.
 +
 +
{{instance msgdoc|__optUncall|0||[[Portrayal]]}}
 +
 +
The [[miranda method]] for this message always returns <code>[[null]]</code>.
For [[Selfless]] objects, __optUncall is guaranteed to return a portrayal which exactly represents the object; if <var>a</var> is selfless, then <var>a</var> [[==]] E.call(E, "call", <var>a</var>.__optUncall()).
For [[Selfless]] objects, __optUncall is guaranteed to return a portrayal which exactly represents the object; if <var>a</var> is selfless, then <var>a</var> [[==]] E.call(E, "call", <var>a</var>.__optUncall()).
__optUncall is typically used by serialization systems for the default portrayal in the absence of other knowledge about the object.
__optUncall is typically used by serialization systems for the default portrayal in the absence of other knowledge about the object.
 +
 +
===Original Javadoc===
 +
 +
Note: The terminology and taxonomy of this text may be outdated. {{XXX|Update this text and integrate it into the wiki}}
 +
 +
This should return either <code>null</code> or a triple describing a call
 +
that, if performed, will create an object resembling this one.
 +
 +
Scalars (ints, float64s, chars, boolean, null) and bare Strings are
 +
''atomic''. __optUncall on an atomic objects return null,
 +
but atomic objects are still considered transparent. Objects which
 +
return non-null are ''non-atomic'' and ''transparent''. Non-atomic
 +
objects that return null are ''opaque''. Opaque objects may be
 +
''selectively transparent'' to certain clients by implementing
 +
[[Miranda optSealedDispatch|__optSealedDispatch]] as described there.
 +
 +
When a transparent non-atomic object is [[Selfless]], then the
 +
result of __optUncall is guaranteed to be accurate: It
 +
describes a call that, when performed, must result in this very same
 +
object, according to [[Ref#isSameEver|E's "==" operation]]. The
 +
Selfless auditor ensures that all Selfless objects are accurately
 +
self-describing in this way.
 +
 +
The uncall of a Selfless object is canonical, so if x and y are both
 +
Selfless, then
 +
 +
    x == y iff x.__optUncall() == y.__optUncall()
 +
 +
Performing the call described by the uncall of a non-Selfless object
 +
generally creates whatever that object wished to create as its
 +
representative, but because it had to provide the ingredients, its
 +
representative could only be something it could have created. Therefore,
 +
the representative cannot convey any more authority than the original
 +
object itself has.
[[Category:Miranda messages]]
[[Category:Miranda messages]]

Latest revision as of 04:40, 1 August 2011

__optUncall/0 is a Miranda message which may return a portrayal of the object receiving it.

__optUncall/0

Signature: __optUncall() :Portrayal

The miranda method for this message always returns null.

For Selfless objects, __optUncall is guaranteed to return a portrayal which exactly represents the object; if a is selfless, then a == E.call(E, "call", a.__optUncall()).

__optUncall is typically used by serialization systems for the default portrayal in the absence of other knowledge about the object.

Original Javadoc

Note: The terminology and taxonomy of this text may be outdated. XXX Update this text and integrate it into the wiki

This should return either null or a triple describing a call that, if performed, will create an object resembling this one.

Scalars (ints, float64s, chars, boolean, null) and bare Strings are atomic. __optUncall on an atomic objects return null, but atomic objects are still considered transparent. Objects which return non-null are non-atomic and transparent. Non-atomic objects that return null are opaque. Opaque objects may be selectively transparent to certain clients by implementing __optSealedDispatch as described there.

When a transparent non-atomic object is Selfless, then the result of __optUncall is guaranteed to be accurate: It describes a call that, when performed, must result in this very same object, according to E's "==" operation. The Selfless auditor ensures that all Selfless objects are accurately self-describing in this way.

The uncall of a Selfless object is canonical, so if x and y are both Selfless, then

   x == y iff x.__optUncall() == y.__optUncall()

Performing the call described by the uncall of a non-Selfless object generally creates whatever that object wished to create as its representative, but because it had to provide the ingredients, its representative could only be something it could have created. Therefore, the representative cannot convey any more authority than the original object itself has.

Personal tools
more tools