X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/ca8f5d55bfc2b792edeb00e48d970b5b6b6c2c9b..d2f1db725b33c0cc55b3eca0744c2a76adf315e9:/doc/intro.tex

diff --git a/doc/intro.tex b/doc/intro.tex
index f4b3168..67a220f 100644
--- a/doc/intro.tex
+++ b/doc/intro.tex
@@ -88,7 +88,7 @@ are subclasses; \Cplusplus\ has no such root class.
 Both systems provide multiple inheritance, but go about it very differently.
 The most important difference is that \Cplusplus\ provides only \emph{static
   delegation}: if you have a class @|B| which defines some (virtual) member
-function @|f|, and a derived class of @|D| which wants to \emph{extend} the
+function @|f|, and a derived class @|D| which wants to \emph{extend} the
 behaviour of @|f| on instances of @|D|, then you must explicitly call @|B::f|
 at the appropriate point:
 \begin{prog}
@@ -143,10 +143,13 @@ which is unlikely to be what was wanted: `B' prints twice, and the `before'
 and `after' actions are both in the middle.\footnote{%
   Of course, one could have arranged to call @|Y::f| before @|X::f| -- but
   the important point is that one would have needed to \emph{know} that this
-  was necessary.} %
+  was necessary.  And you still end up with two copies of `B'.} %
 The problem is that correctly composing behaviour from a collection of
 superclasses requires knowledge of all of the superclasses involved and how
-they're supposed to work together.
+they're supposed to work together.  Messing with virtual base classes has
+eliminated the problem of duplicating @|B|'s state, but has done nothing to
+help avoid duplicating @|B|'s \emph{behaviour} -- which is a shame, because
+duplicating one without the other is going to end badly.
 
 The obvious workaround is to separate the functionality -- here, printing the
 messages -- from the plumbing, which arranges to do everything in the right
@@ -161,7 +164,7 @@ the various @|_f| functions in the right order, like this:
     void _f() \{ std::cout <{}< "B@\\n"; \}                   \-\\
   public:                                                       \\ \ind
     virtual void f() \{ _f(); \}                                \\
-    virtual ~B() \{ \}                                        \-\\
+    virtual @~B() \{ \}                                        \-\\
   \};                                                           \\+
                                                                 %
   class X: virtual public B \{                                  \\
