X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/1edb774eed8bea3f6dbde5b02db6ecd209394cf8..4b3a72700ae8799ba6ba07969e2677f2168d32a9:/doc/concepts.tex diff --git a/doc/concepts.tex b/doc/concepts.tex index 8e774fe..cabb1ab 100644 --- a/doc/concepts.tex +++ b/doc/concepts.tex @@ -537,7 +537,7 @@ Keyword arguments can be provided in three ways. \end{enumerate} Perhaps surprisingly, keyword arguments have a relatively small performance -impact. On the author's aging laptop, a call to a simple function, passing +impact. On the author's ageing laptop, a call to a simple function, passing two out of three keyword arguments, takes about 30 cycles longer than calling a standard function which just takes integer arguments. On the other hand, quite a lot of code is involved in decoding keyword arguments, so code size @@ -1072,7 +1072,14 @@ follows. initializers, \emph{and} the sender supplied a value for one or more of the corresponding effective initargs, then the value of the most specific such initarg is stored in the slot. (For this purpose, initargs defined earlier - in a class definition are more specific than initargs defined later.) + in a class definition are more specific than initargs defined + later.)\footnote{% + This is very different from the CLOS behaviour, in which a slot is + initialized from the first applicable initarg in the argument list. + Sod's keyword-argument machinery works in two stages: firstly, the + arguments values are collected into a structure on entry into an + effective method, which loses track of the order in which the arguments + were passed; and only then are the direct methods invoked.} \item Otherwise, if there are any slot initializers defined which include an initializer expression, then the initializer expression from the most @@ -1278,7 +1285,7 @@ functions. Metaobject classes are chosen in a fairly standard way. \begin{itemize} \item All metaobject definitions support a symbol-valued property, usually - named @|@_class| (e.g., @|slot_class|, @|method_class|), which sets + named @|@{}_class| (e.g., @|slot_class|, @|method_class|), which sets the metaobject class explicitly. (The class for a class metaobject is taken from the @|lisp_class| property, because @|class_class| seems less meaningful.)