Oh yes, having newly been using C++ at work, I realized they were a &quot;big something&quot; [1] that enabled you, as it were, to do whatever unstructured unholy type trickery you want, and yes, even making classes A&lt;B&gt; and A&lt;C&gt; completely different things. (BUT! We could argue over this fact: Isn&#39;t it also one of the purposes of... Type Families? Where the TF Foo :: * -&gt; *, can yield to datatypes Foo String and Foo Int being completely different and unrelated?)<br>

I was more saying that you could roughly &quot;emulate&quot; Haskell classes in C++ with templates (minus a good type security).<br><br>[1] Vernacular, isn&#39;t it?<br><br><br><div class="gmail_quote">2011/6/10 Richard O&#39;Keefe <span dir="ltr">&lt;<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On 9/06/2011, at 8:02 PM, Yves Parès wrote:<br>
<br>
&gt; Were templates an original feature of C++ or did they appear in a revision of the langage ?<br>
<br>
</div>The latter.  &quot;C with classes&quot; did not have multiple inheritance, exceptions, or templates.<br>
<br>
Note that C++ templates are *not* the same kind of animal as Eiffel generics or Java generics<br>
or Ada generics or Haskell parametric polymorphism.  The C++ template language lets you do<br>
type-level functional programming, and different instances of a common &quot;type constructor&quot; may<br>
in fact have quite different internal structures.  C++ templates are NOT &#39;merely keywords<br>
around .. parametric polymorphism&#39;, they are a far more dangerous thing.<br>
<br>
</blockquote></div><br>