[]/1¶
Description¶
[Object::Message]
[{Proxy}::Message]
This control construct allows the programmer to send a message to an object while preserving the original sender. It is mainly used in the definition of object handlers for unknown messages. This functionality is usually known as delegation but be aware that this is an overloaded word that can mean different things in different object-oriented programming languages.
To prevent using of this control construct to break object encapsulation, an attempt to delegate a message to the original sender results in an error. The remaining error conditions are the same as the ::/2 control construct.
Note that, despite the correct functor for this control construct being
(traditionally) '.'/2
, we refer to it as []/1
simply to
emphasize that the syntax is a list with a single element.
Modes and number of proofs¶
[+object_identifier::+callable] - zero_or_more
[{+object_identifier}::+callable] - zero_or_more
Errors¶
permission_error(access, object, Sender)
instantiation_error
type_error(object_identifier, Object)
type_error(callable, Message)
permission_error(access, private_predicate, Name/Arity)
permission_error(access, protected_predicate, Name/Arity)
existence_error(predicate_declaration, Name/Arity)
existence_error(object, Object)
instantiation_error
type_error(object_identifier, Proxy)
existence_error(procedure, Name/Arity)