These methods starting with an’_’(underscore) are defined
both on class function
and class object.
Their behaviour is equivalent to the counterpart with the leading
underscore deleted for normal objects. As these methods are explicitly
defined on class function
however, invoking one of these methods to a function will cause the
function itself to handle the message instead of the evaluation.
Example:
?- new(O, @display?size),
get(O, '_class_name', C1),
get(O, class_name, C2).
C1 = ?
C2 = size
Bugs: It is probably more elegant to introduce a separate
send- and get- operation that does not evaluate the receiver.
- See also
- - object
<-class
- class ?