    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: From Mechanism to Method</title>
        <link>https://members.accu.org/index.php/articles/468</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + Overload Journal #40 - Dec 2000</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c164/">40</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-164/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+164/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;From Mechanism to Method</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 26 December 2000 16:46:04 +00:00 or Tue, 26 December 2000 16:46:04 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
<h3>Valued Conversions</h3>
</div>
<p>&quot;How would you like to pay for that?&quot; Good question. Digging
deep into pockets, wallets, and bags uncovered a wealth of
possibilities, a handful of different currencies and mechanisms to
choose from: credit cards, debit cards, coins, bills, and a couple
of IOUs. Each form in some way substitutable for another when
realizing monetary value.</p>
<p>Cash is the simplest, least troublesome form for small amounts
and quick transactions. However, sifting through the metal and
paper it seemed that my currencies were no good. Well, that's not
strictly true: The currencies were fine, just for somewhere else
not here. Like any form of use, appropriate use of currency is
context sensitive, requiring explicit conversion (typically
incurring an overhead) for use elsewhere. The same was true of the
debit cards I had, so I settled on one of the credit cards.
Relatively transparent use, with all the mechanism of billing and
conversion safely hidden behind a signature and a smile.</p>
<p>As the assistant struggled with the point-of-sale system, my
thoughts inevitably turned to software. Substitutability in
programming is often associated with good practice use of
inheritance in object-oriented development [<a href=
"#Liskov1987">Liskov1987</a>, <a href=
"#Coplien1992">Coplien1992</a>], providing a thorough <span class=
"emphasis"><em>is-a-kind-of</em></span> litmus test for structural
relationships between classes. In this sense it gives purpose and
some sense of quality to what is otherwise simply a language
mechanism; of itself inheritance is neither good nor bad.</p>
<p>Generally we can see substitutability as a measure of fit
between expectation, mechanism, and actual use. It is a more
general principle than simply an inheritance recommendation,
applying equally well to other mechanisms - of which C++ has many.
Where practice makes sense of mechanism, thinking about
substitutability offers an alternative way of thinking about
language features. <span class="emphasis"><em>Table 1</em></span>
identifies types of substitutability in C++ we may consider useful
in reasoning about our types and functions [<a href=
"#Henney2000">Henney2000</a>].</p>
<div class="table"><a name="d0e45" id="d0e45"></a>
<table summary="Different kinds of substitutability in C++."
border="1" cellspacing="0">
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;&lt;/colgroup&gt;
&lt;thead&gt;
<tr>
<th>Substitutability</th>
<th>Mechanisms</th>
</tr>
&lt;/thead&gt;
&lt;tbody&gt;
<tr>
<td>Conversions</td>
<td>Implicit and explicit conversions</td>
</tr>
<tr>
<td>Overloading</td>
<td>Overloaded functions and operators, often in combination with
conversions</td>
</tr>
<tr>
<td>Derivation</td>
<td>Inheritance</td>
</tr>
<tr>
<td>Mutability</td>
<td>Qualification (typically const) and the use of conversions,
overloading, and derivation</td>
</tr>
<tr>
<td>Genericity</td>
<td>Templates and the use of conversions, overloading, derivation,
and mutability</td>
</tr>
&lt;/tbody&gt;
</table>
<p class="title c3">Table 1. Different kinds of substitutability in
C++.</p>
</div>
<p>Where a type defines a set of operations - not necessarily
member functions [<a href="#Sutter2000">Sutter2000</a>, <a href=
"#Meyers2000">Meyers2000</a>] - applicable to a type, a type
hierarchy defines the fit between types, and may or may not be
associated with a class hierarchy. In the case of payment we can
see that there is no useful structural relationship between the
types that leads us to any concrete form of inheritance.</p>
<p>Substitutability here is based on values and conversions between
values. Sometimes the use is implicit, at other times it must be
made explicit. Conversions can be fully value preserving, widening,
or narrowing. Widening conversions are always safe and typically
acceptable (e.g. tipping), whereas narrowing conversions may not be
(e.g. short-changing tends to lead to exceptional or even undefined
behaviour).</p>
<p>Rescuing me from further metaphor stretch, the point-of-sale
system and assistant's smile kicked into life.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e93" id="d0e93"></a>Value
Classes</h2>
</div>
<p>Values are strongly informational objects for which identity is
not significant, i.e. the focus is principally on their state
content and any behaviour organized around that. Another
distinguishing features of values is their granularity: They are
typically fine-grained objects, representing simple concepts in the
system such as quantities [<a href=
"#B%C3%A4umer-1998">B&auml;umer-1998</a>].</p>
<p>In C++, values are associated with an idiomatic set of
capabilities and conventions. The emphasis of a value lies in its
state not its identity. Thus values can be copied and typically
assigned one to another, requiring the explicit or implicit
definition of a public copy constructor and public assignment
operator. Values typically live within other scopes, i.e. within
objects or blocks, rather than on the heap. Values are therefore
normally passed around and manipulated directly as variables or
through references, but not as pointers that emphasize identity and
indirection. As a consequence of this immediacy, indirection
transparency, and granularity, operator overloading and conversions
often make sense for value classes where they do not for more
granular, heap-based objects manipulated through pointers.</p>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e103" id="d0e103"></a>All Things to
All People</h3>
</div>
<p>There are times when a generic (in the sense of <span class=
"emphasis"><em>general</em></span> rather than <span class=
"emphasis"><em>template-based programming</em></span>) type is
needed, accommodating values of many other more specific types
rather than C++'s normal strict and static types. We can
distinguish three basic kinds of generic type:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>Converting types that can hold one of a number of possible value
types, e.g. <tt class="type">int</tt> and <tt class=
"type">string</tt>, and freely convert between them, for instance
interpreting 5 as &quot;5&quot; or vice-versa. Such types are common in
scripting and other interpreted languages. In implementation are
often interpreted strings, encapsulated unions of a fixed set of
types that freely support the required conversions, or closed class
hierarchies [<a href="#Coplien2000">Coplien2000</a>, <a href=
"#Sommerlad-1999">Sommerlad-1999</a>].</p>
</li>
<li>
<p>Discriminated types that contain values of different types but
do not attempt conversion between them, i.e. 5 is held strictly as
an <tt class="type">int</tt> and is not implicitly convertible
either to &quot;5&quot; or to 5.0. Their indifference to interpretation but
awareness of type effectively makes them safe, generic containers
of single values, with no scope for surprises from ambiguous
conversions. In implementation these are often held either as
encapsulated, discriminated unions of a fixed set of types or
through a combination of <tt class="type">void *</tt> and a known
type code.</p>
</li>
<li>
<p>Indiscriminate types that can refer to anything but are
oblivious to the actual underlying type, entrusting all forms of
access and interpretation to the programmer. This niche is
dominated by <tt class="type">void *</tt>, which offers plenty of
scope for surprising, undefined behaviour.</p>
</li>
</ul>
</div>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e145" id="d0e145"></a>State of the
Union</h3>
</div>
<p>In demonstrating substitutability concepts - conversions in
particular - the remainder of this article is going to explore a
generalized, discriminated union type named <tt class=
"classname">any</tt>.</p>
<p>Working from the inside out, how can a generic value contain any
arbitrary value safely? A conventional union is out of the question
as these alias only a predefined, fixed set of types. A next guess
might land on a <tt class="type">void *</tt> and <tt class=
"type">const type_info *</tt> pairing. This seems to allow easy
creation and querying, but falls down on type-safe copying and
destruction: How can you correctly copy or delete an instance of a
type of which you are unaware? From this question comes the seed of
a solution: Inheritance and runtime polymorphism offer a form of
substitutability between types that allows us to work safely
through a common interface while ignoring the differences we can
neither know nor manage. A virtual destructor provides the
mechanism for safe deletion, and a virtual clone function offers a
route for safe copying - effectively a <i class="firstterm">Virtual
Copy Constructor</i> [<a href="#Coplien1992">Coplien1992</a>,
<a href="#Gamma-1995">Gamma-1995</a>]. However, this requires that
value types inherit from a common base - not possible for
pre-existing types - and would defeat the original objective of the
<tt class="classname">any</tt> class.</p>
<p>Template classes provide a mechanism for defining arbitrary
containers. Combining templates with derivation reveals a solution
(see Listing 1). A generalized base class, placeholder, offers the
required copying, querying, and deletable interface. From this, the
templated holder class fills in the details for any arbitrary type.
This example mixes derivation substitutability and generic
substitutability. The generic interface requirement is that
contained values must be <i class="firstterm">CopyConstructible</i>
[<a href="#ISO1998">ISO1998</a>]. Clients of <tt class=
"classname">any</tt> remain blissfully unaware of all this
encapsulated detail. This design is most generally an example of
the <i class="firstterm">Adapter</i> pattern [<a href=
"#Gamma-1995">Gamma-1995</a>], and more specifically the <i class=
"firstterm">External Polymorphism</i> pattern [<a href=
"#Cleeland-1998">Cleeland-1998</a>].</p>
<div class="sidebar">
<p class="title c3">Listing 1. Representation and basic
construction of a generalized union type.</p>
<pre class="programlisting">
class any
{
public:
  any()
    : content(0)
  {
  }
  ~any()
  {
    delete content;
  }
  const std::type_info &amp;type_info() const
  {
    return content ? 
          content-&gt;type_info() 
        : typeid(void);
  }
  ...
private:
  class placeholder
  {
  public:
    virtual ~placeholder()
    {
    }
    virtual const std::type_info &amp;
               type_info() const = 0;
    virtual placeholder *
                  clone() const = 0;
  };
  template&lt;typename value_type&gt;
  class holder : public placeholder
  {
  public:
    holder(const value_type &amp;value)
      : held(value)
    {
    }
    virtual const std::type_info &amp;
                    type_info() const
    {
      return typeid(value_type);
    }
    virtual placeholder *clone() const
    {
      return new holder(held);
    }
    const value_type held;
  };
  placeholder *content;
};
</pre></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e201" id="d0e201"></a>Inward
Conversions</h3>
</div>
<p>An implicit conversion from one or more other types into one we
are developing can be supported by the introduction of one or more
single argument, converting constructors on a class. Such
conversions should be used in support of making conceptually
similar types substitutable, emphasizing their commonality, and
allowing an existing type to be used where a new one is expected.
For instance, <tt class="type">string</tt> and <tt class=
"type">char *</tt> are each different realizations of the concept
of a character string. They are not perfect substitutes for one
another, but there is an implied level of equivalence in meaning
that should be respected and supported by the developer. Where
single constructor arguments are needed, but equivalence does not
make sense, the explicit keyword should be used. For instance, a
file object may be initialised from a string representing its
pathname, but it cannot be considered a realization of strings.</p>
<p>A degenerate form of conversion is the identity conversion, i.e.
where an instance of a type can be converted into another instance
of the same type. The copy constructor and assignment operator
express this concept. An overloaded assignment operator can be used
to optimise any use of a converting constructor followed by a copy
assignment. For a string class, this means:</p>
<pre class="programlisting">
class string
{
public:
  string(const char *);
  string(const string &amp;);
  string &amp;operator=(const string &amp;);
  string &amp;operator=(const char *);
  ...
};
</pre>
<p>Providing converting constructor also provides the developer
with a cast form for a type. It is not possible to define a literal
form for a new type, but the constructor expression syntax comes
close, e.g. <tt class="literal">string(&quot;theory&quot;)</tt>. This is
stylistically preferable to using <tt class=
"literal">static_cast</tt> as the conversions are well-defined - as
opposed to a potentially dangerous conversion that must be
highlighted in the source code - and corresponds well to the idea
of constructing a new value. The preferred &quot;constructor literal&quot;
style also means that code appears consistent when used with other
multiple argument constructed forms, e.g. <tt class=
"literal">string(5, '*')</tt>.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e227" id=
"d0e227"></a>Unionization</h3>
</div>
<p>Considering what inward conversions are reasonable to support
can flesh the <tt class="classname">any</tt> class out further (see
<span class="emphasis"><em>Listing 2</em></span>). Certainly
copying one <tt class="classname">any</tt> to another by
construction or by assignment is essential for any value class. The
copy constructor takes advantage of the representation's clone
function to perform polymorphic copying, and a non-throwing swap
function allows for an exception and self-assignment safe copy
assignment operator [<a href="#Henney1998">Henney1998</a>, <a href=
"#Sutter2000">Sutter2000</a>].</p>
<p>Employing the member template mechanism supports implicit
conversion from values of an arbitrary type into an <tt class=
"classname">any</tt>. This is used in the converting constructor
and the templated assignment operator, allowing values of any type
to be used where an <tt class="classname">any</tt> is expected.</p>
<div class="sidebar">
<p class="title c3">Listing 2. Inward conversions and helpers for a
generalized union type.</p>
<pre class="programlisting">
class any
{
public:
  ...
  any(const any &amp;other)
    : content(other.content ?
          other.content-&gt;clone() : 0)
  {
  }
  template&lt;typename value_type&gt;
  any(const value_type &amp;value)
    : content(new holder&lt;value_type&gt; 
                      (value))
  {
  }
  any &amp;swap(any &amp;rhs)
  {
    std::swap(content, rhs.content);
    return *this;
  }
  any &amp;operator=(const any &amp;rhs)
  {
    return swap(any(rhs));
  }
  template&lt;typename value_type&gt;
  any &amp;operator=(const value_type &amp;rhs)
  {
    return swap(any(rhs));
  }
  ...
};
</pre></div>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e260" id="d0e260"></a>Outward
Conversions</h2>
</div>
<p>An implicit conversion from another type into a type we are
defining can be provided through a user defined conversion operator
(UDC). However, UDCs should be treated with some caution; they are
typically far less appropriate than a corresponding inward
conversion. For instance, although a <tt class="type">const char
*</tt> can be reasonably passed where a string object is expected,
the converse is not true:</p>
<pre class="programlisting">
class string
{
public:
  ...
  operator const char *() const;
  ...
};
</pre>
<p>Because of the lifetime of temporary objects, the following
would result in undefined behaviour:</p>
<pre class="programlisting">
string prefix, suffix;
...
const char *whole = prefix + suffix;
cout &lt;&lt; whole &lt;&lt; endl;
</pre>
<p>This is the reason that <tt class="classname">std::string</tt>
does not support such a conversion.</p>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e279" id="d0e279"></a>Truth and
Beauty</h3>
</div>
<p>Whereas a conversion from any type into an <tt class=
"classname">any</tt> type is widening, and therefore always safe, a
conversion outward is narrowing, and therefore potentially unsafe -
all types can be used where an <tt class="classname">any</tt> is
expected but not vice-versa. Alas, the absence of explicit UDCs in
the language means we cannot retain uniform usage syntax for casts
whilst also preserving the constraint of explicitness. We must
resort to a more conservative approach, such as the named
<tt class="methodname">to_ptr</tt> member template function (see
<span class="emphasis"><em>Listing 3</em></span>).</p>
<p>There is one query, however, that may be conveniently expressed
through a UDC: Does an <tt class="classname">any</tt> hold a value?
For many classes this immediately translates to <tt class=
"methodname">operator bool</tt>. However, in many cases it turns
out that <tt class="type">bool</tt> is not the safest realization
of a Boolean type. It introduces a number of subtle conversion
problems for many classes, such as smart pointers [<a href=
"#Meyers1996">Meyers1996</a>] or <tt class=
"literal">IOStream</tt>s, which at one stage in their
standardization sported such an operator. These problems stem
typically from <tt class="type">bool</tt>'s underlying integer
nature: Its eagerness to participate in all kinds of (surprising)
arithmetic and comparison. In contrast to <tt class=
"type">bool</tt>, a <tt class="type">const void *</tt> is
positively hermit-like in its interactions with other types and
operators.</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e322" id="d0e322"></a>Custom
Keyword Casts</h2>
</div>
<p>How can an explicit outward conversion be provided for a type,
or for a conversion between two existing types using a particular
conversion method not already implemented by either type? The
omission of explicit UDCs from the language closes one avenue, but
the inclusion of templates and, in particular, explicit template
function qualification opens another.</p>
<p>The keyword casts - e.g. <tt class="literal">dynamic_cast</tt> -
are template-like in appearance. It is possible to emulate them
with template functions, idiomatically defining new custom keyword
casts that provide new kinds of named, explicit conversion
[<a href="#Stroustrup1997">Stroustrup1997</a>, <a href=
"#Boost">Boost</a>]. For instance, the following offers a simple
approach for converting between any two types that support
streaming:</p>
<pre class="programlisting">
template&lt;typename result_type, 
                  typename arg_type&gt;
result_type 
    interpret_cast(const arg_type &amp;arg)
{
  std::stringstream interpreter;
  interpreter &lt;&lt; arg;
  result_type result = result_type();
  interpreter &gt;&gt; result;
  return result;
}
</pre>
<p>This makes script-like interpretation of values a convenience in
C++, e.g.</p>
<pre class="programlisting">
string 
  forty = interpret_cast&lt;string&gt;(40);
int two = interpret_cast&lt;int&gt;(&quot;2&quot;);
</pre>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e344" id="d0e344"></a>Cast out of the
Union</h3>
</div>
<p>Based on the <tt class="methodname">to_ptr</tt> member template,
it is possible to provide a checking cast, <tt class=
"methodname">any_cast</tt>, that may be used to extract value's of
a particular type from an any (see <span class=
"emphasis"><em>Listing 3</em></span>).</p>
<div class="sidebar">
<p class="title c3">Listing 3. Functions to extract the value from
a generalized union type.</p>
<pre class="programlisting">
class any
{
public:
  ...
  operator const void *() const
  {
    return content;
  }
  template&lt;typename value_type&gt;
  bool copy_to(value_type &amp;value) const
  {
    const value_type *copyable =
                 to_ptr&lt;value_type&gt;();
    if(copyable)
      value = *copyable;
    return copyable;
  }
  template&lt;typename value_type&gt;
  const value_type *to_ptr() const
  {
    return type_info() == typeid(value_type)
    ? &amp;static_cast&lt;holder&lt;value_type&gt; *&gt;
                     (content)-&gt;held
      : 0;
  }
  ...
};
template&lt;typename value_type&gt;value_type any_cast(const any &amp;operand)
{
  const value_type *result 
        = operand.to_ptr&lt;value_type&gt;();
  return result ? *result 
              : throw std::bad_cast();
}
</pre></div>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e363" id=
"d0e363"></a>Conclusion</h2>
</div>
<p>Money is a mechanism. As parents, partners, and both public and
private enterprise will recognize, understanding the mechanism does
not necessarily impart wisdom as to its best use. The same can be
said of C++'s many features: Knowledge of denomination does not
necessarily settle design issues. Principles and practices
associated that conceptually organize features into a more coherent
whole can assist the programmer.</p>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e368" id="d0e368"></a>References</h2>
</div>
<div class="bibliomixed"><a name="B%C3%A4umer-1998"></a>
<p class="bibliomixed">[B&auml;umer-1998] Dirk B&auml;umer, Dirk
Riehle, Wolf Siberski, Carola Lilienthal, Daniel Megert, Karl-Heinz
Sylla, and Heinz Z&uuml;llighoven, &quot;Values in Object Systems&quot;,
<span class="citetitle"><i class="citetitle">Ubilab Technical
Report</i></span> 98.10.1, 1998.</p>
</div>
<div class="bibliomixed"><a name="Boost" id="Boost"></a>
<p class="bibliomixed">[Boost] Boost library website, <span class=
"bibliomisc"><a href="http://www.boost.org" target=
"_top">http://www.boost.org</a></span>.</p>
</div>
<div class="bibliomixed"><a name="Cleeland-1998" id=
"Cleeland-1998"></a>
<p class="bibliomixed">[Cleeland-1998] Chris Cleeland, Douglas C
Schmidt, and Tim Harrison, &quot;External Polymorphism&quot;, <span class=
"citetitle"><i class="citetitle">Pattern Languages of Program
Design 3</i></span>, edited by Robert Martin, Dirk Riehle, and
Frank Buschmann, Addison-Wesley, 1998.</p>
</div>
<div class="bibliomixed"><a name="Coplien1992" id=
"Coplien1992"></a>
<p class="bibliomixed">[Coplien1992] James O Coplien, <span class=
"citetitle"><i class="citetitle">Advanced C++: Programming Styles
and Idioms</i></span>, Addison-Wesley, 1992.</p>
</div>
<div class="bibliomixed"><a name="Coplien2000" id=
"Coplien2000"></a>
<p class="bibliomixed">[Coplien2000] James O Coplien, &quot;C++ Idioms&quot;,
<span class="citetitle"><i class="citetitle">Pattern Languages of
Program Design 4</i></span>, edited by Neil Harrison, Brian Foote,
and Hans Rohnert, Addison-Wesley, 2000.</p>
</div>
<div class="bibliomixed"><a name="Gamma-1995" id="Gamma-1995"></a>
<p class="bibliomixed">[Gamma-1995] Erich Gamma, Richard Helm,
Ralph Johnson, and John Vlissides, <span class=
"citetitle"><i class="citetitle">Design Patterns: Elements of
Reusable Object-Oriented Software</i></span>, Addison-Wesley,
1995.</p>
</div>
<div class="bibliomixed"><a name="Henney1998" id="Henney1998"></a>
<p class="bibliomixed">[Henney1998] Kevlin Henney, &quot;Creating Stable
Assignments&quot;, <span class="citetitle"><i class="citetitle">C++
Report</i></span> 10(6), June 1998.</p>
</div>
<div class="bibliomixed"><a name="Henney2000" id="Henney2000"></a>
<p class="bibliomixed">[Henney2000] Kevlin Henney, &quot;From Mechanism
to Method: Substitutability&quot;, <span class="citetitle"><i class=
"citetitle">C++ Report</i></span> 12(5), May 2000.</p>
</div>
<div class="bibliomixed"><a name="ISO1998" id="ISO1998"></a>
<p class="bibliomixed">[ISO1998] <span class="citetitle"><i class=
"citetitle">International Standard: Programming Language -
C++</i></span>, ISO/IEC 14882:1998(E), 1998.</p>
</div>
<div class="bibliomixed"><a name="Liskov1987" id="Liskov1987"></a>
<p class="bibliomixed">[Liskov1987] Barbara Liskov, &quot;Data
Abstraction and Hierarchy&quot;, <span class="citetitle"><i class=
"citetitle">OOPSLA '87 Addendum to the Proceedings</i></span>,
October 1987.</p>
</div>
<div class="bibliomixed"><a name="Meyers1996" id="Meyers1996"></a>
<p class="bibliomixed">[Meyers1996] Scott Meyers, <span class=
"citetitle"><i class="citetitle">More Effective C++: 35 New Ways to
Improve Your Programs and Designs</i></span>, Addison-Wesley,
1996.</p>
</div>
<div class="bibliomixed"><a name="Meyers2000" id="Meyers2000"></a>
<p class="bibliomixed">[Meyers2000] Scott Meyers, &quot;How Non-Member
Functions Improve Encapsulation&quot;, <span class="citetitle"><i class=
"citetitle">C/C++ Users Journal</i></span>, February 2000.</p>
</div>
<div class="bibliomixed"><a name="Sommerlad-1999" id=
"Sommerlad-1999"></a>
<p class="bibliomixed">[Sommerlad-1999] Peter Sommerlad and Marcel
R&uuml;edi, &quot;Do-it-yourself Reflection&quot;, <span class=
"citetitle"><i class="citetitle">Proceedings of the 3rd European
Conference of Patterns Languages of Programming and Computing
1998</i></span>, edited by Jens Coldeway and Paul Dyson, 1999.</p>
</div>
<div class="bibliomixed"><a name="Stroustrup1997" id=
"Stroustrup1997"></a>
<p class="bibliomixed">[Stroustrup1997] Bjarne Stroustrup,
<span class="citetitle"><i class="citetitle">C++ Programming
Language</i></span>, 3rd edition, Addison-Wesley, 1997.</p>
</div>
<div class="bibliomixed"><a name="Sutter2000" id="Sutter2000"></a>
<p class="bibliomixed">[Sutter2000] [Sutter2000] Herb Sutter,
<span class="citetitle"><i class="citetitle">Exceptional
C++</i></span>, Addison-Wesley, 2000.</p>
</div>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
