Penguin
Diff: PolymorphicTypes
EditPageHistoryDiffInfoLikePages

Differences between version 2 and predecessor to the previous major change of PolymorphicTypes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Tuesday, April 8, 2003 8:34:52 am by SamJansen Revert
Older page: version 1 Last edited on Monday, February 24, 2003 4:06:52 pm by GlynWebster Revert
@@ -16,8 +16,9 @@
  
 [ML] and [Haskell] have polymorphic typing. 
  
 In [C] you can approximate polymophic typing with __void__ pointer arguments, which will take pointers to any type. In [Java] and [C++] approximate polymorphic typing by using Object classes, which all objects belong to. But in both cases you lose strong type checking, so the quality of your code suffers. 
+''It should be noted here that [C++] has templates, which allow strong type checking with PolymorphicTypes. These are often called GenericTypes. -- SamJansen''  
  
 !!!An Example 
  
 This is Glyn defining a binary tree type on his [Ocaml] interpreter: