| Line 66... |
Line 66... |
| 66 |
object is removed. The next call to the function will recompute the
|
66 |
object is removed. The next call to the function will recompute the
|
| 67 |
merged definitions.
|
67 |
merged definitions.
|
| 68 |
|
68 |
|
| 69 |
When methods list are merged, they can come from two sources:
|
69 |
When methods list are merged, they can come from two sources:
|
| 70 |
\enumerate{
|
70 |
\enumerate{
|
| 71 |
\item {Methods list objects for the same function on one or more
|
71 |
\item {Methods list objects for the same function anywhere on the
|
| 72 |
currently attached databases. These are merged so that methods in
|
72 |
current search list. These are merged so that methods in
|
| 73 |
a database earlier in the search list override methods for the
|
73 |
an environment earlier in the search list override methods for the
|
| 74 |
same function later in the search list. A method overrides only
|
74 |
same function later in the search list. A method overrides only
|
| 75 |
another method for the same signature. See the comments on class
|
75 |
another method for the same signature. See the comments on class
|
| 76 |
\code{"ANY"} in the section on \bold{Inheritance}.
|
76 |
\code{"ANY"} in the section on \bold{Inheritance}.
|
| 77 |
}
|
77 |
}
|
| 78 |
\item {Methods list objects corresponding to the generic function
|
78 |
\item {Methods list objects corresponding the group generic functions, if any, for this
|
| 79 |
itself and to the group generic functions, if any, for this
|
- |
|
| 80 |
function. Any generic function can be defined to belong to a
|
79 |
function. Any generic function can be defined to belong to a
|
| 81 |
group generic. The methods for the group generic are available as
|
80 |
group generic. The methods for the group generic are available as
|
| 82 |
methods for this function. The group generic can itself be
|
81 |
methods for this function. The group generic can itself be
|
| 83 |
defined as belong to a group; as a result there is a list of group
|
82 |
defined as belong to a group; as a result there is a list of group
|
| 84 |
generic functions. A method defined for a function and a
|
83 |
generic functions. A method defined for a function and a
|
| 85 |
particular signature overrides a method for the same signature for
|
84 |
particular signature overrides a method for the same signature for
|
| 86 |
that function's group generic.
|
85 |
that function's group generic.
|
| 87 |
}
|
86 |
}
|
| 88 |
}
|
87 |
}
|
| 89 |
Merging is done first over databases for a particular function, and
|
88 |
Merging is done first on all methods for a particular function, and
|
| 90 |
then over the generic and its group generics.
|
89 |
then over the generic and its group generics.
|
| 91 |
|
90 |
|
| 92 |
The result is a single methods list object that contains all the
|
91 |
The result is a single methods list object that contains all the
|
| 93 |
methods \emph{directly} defined for this function. As calls to the
|
92 |
methods \emph{directly} defined for this function. As calls to the
|
| 94 |
function occur, this information may be supplemented by
|
93 |
function occur, this information may be supplemented by
|