chiark / gitweb /
doc/: Some minor tweaks and corrections.
[sod] / doc / concepts.tex
index e301ae7813e861506f871b6fe38b4f448e03d9a4..187a6f8f4286e347b706b8c150cfbccc7fc32b31 100644 (file)
@@ -122,11 +122,11 @@ superclasses.
 If an object is a direct instance of class~$C$ then the object is also an
 (indirect) instance of every superclass of $C$.
 
-If $C$ has a proper superclass $B$, then $B$ is not allowed to have $C$ has a
-direct superclass.  In different terms, if we construct a graph, whose
-vertices are classes, and draw an edge from each class to each of its direct
-superclasses, then this graph must be acyclic.  In yet other terms, the `is a
-superclass of' relation is a partial order on classes.
+If $C$ has a proper superclass $B$, then $B$ must not have $C$ as a direct
+superclass.  In different terms, if we construct a graph, whose vertices are
+classes, and draw an edge from each class to each of its direct superclasses,
+then this graph must be acyclic.  In yet other terms, the `is a superclass
+of' relation is a partial order on classes.
 
 \subsubsection{The class precedence list}
 This partial order is not quite sufficient for our purposes.  For each class
@@ -288,8 +288,10 @@ and its type is usually @|SodClass|; @|SodClass|'s nickname is @|cls|.
 
 A class object's slots contain or point to useful information, tables and
 functions for working with that class's instances.  (The @|SodClass| class
-doesn't define any messages, so it doesn't have any methods.  In Sod, a class
-slot containing a function pointer is not at all the same thing as a method.)
+doesn't define any messages, so it doesn't have any methods other than for
+the @|SodObject| lifecycle messages @|init| and @|teardown|; see
+\xref{sec:concepts.lifecycle}.  In Sod, a class slot containing a function
+pointer is not at all the same thing as a method.)
 
 \subsubsection{Conversions}
 Suppose one has a value of type pointer-to-class-type for some class~$C$, and
@@ -314,7 +316,7 @@ There are three main cases to distinguish.
   conversion can fail: the object in question might not be an instance of~$B$
   after all.  The macro \descref{SOD_CONVERT}{mac} and the function
   \descref{sod_convert}{fun} perform general conversions.  They return a null
-  pointer if the conversion fails.  (There are therefore your analogue to the
+  pointer if the conversion fails.  (These are therefore your analogue to the
   \Cplusplus\ @|dynamic_cast<>| operator.)
 \end{itemize}
 The Sod translator generates macros for performing both in-chain and
@@ -847,8 +849,8 @@ other method takes steps to prevent this.
 
 Slots are initialized in a well-defined order.
 \begin{itemize}
-\item Slots defined by a more specific superclasses are initialized after
-  slots defined by a less specific superclass.
+\item Slots defined by a more specific superclass are initialized after slots
+  defined by a less specific superclass.
 \item Slots defined by the same class are initialized in the order in which
   their definitions appear.
 \end{itemize}