Hi,

I just want to settle an arguement between a fellow programmer and i.

What is the exact definition of a Polymorphic Class?

My interpretation is as so:

A parametric polymorphic function is unbound if it contains a template parameter, where as it is bound if it countains a set number of determinable (during static linking) data types (eg overloaded functions in a class).

Now a polymorphic class is a bound polymorphic class if it contains no parameter variables, and is simply a standard class.

A polymorphic unbound class has a template parameter, denoting the polymorphic element of the class.

This boils down to:
Bound = known types, Unbound = Unknown types

Bound Polymorphic Class = non-templated class.
Unbound Polymorphic Class = templated class.

I understand the need for the virtual function pointer inside a hierarchical class definintion, which is then used to perform the dynamic bind when attempting to resolve the correct virtual function call at run time - however a virtual function pointer along doesnt alone create polymorphism.

However my knowledge of polymorphism boils down to the number of types used in a function (as per lambda calculus...?)

My friend's defintion:

A polymorphic class is a class which contains a virtual function pointer.

He also believes that a Monomorphic class is a standard class.

Is there such thing as a monomorphic class? From what i guess he means by this is a bound polymorphic class (from my interpretation).


---

If im wrong on any points please bash me for being dumb, i just would like to resolve this arguement (even if im wrong!)



Cheers,