[fpc-devel] Generics Basics

John Briggs johneb47atoptusnetdotcomdotau at johneb47.id.au
Fri Nov 11 10:56:17 CET 2005

On Fri, Nov 11, 2005 at 08:50:09AM +0100, Micha Nelissen wrote:
> John Briggs wrote:
> >The one thing that does concern me is why implement generics if you fail 
> >to implement the late binding of the objects which to me is the greatest 
> >gain of
> >generic programming.
> What is "late binding" exactly ? What are you binding ?

Oops! I didn't proof read my reply   ...gain of object oriented programming.

Early binding is occurs in C++; where the objects are bound at compile time.
Objects in Objective C and Smalltalk have late binding as the binding occurs
at runtime.

Objects in Object Pascal and FPC can be bound either early or late depending 
on how they are declared (virtual for late binding). (Oops takes foot out of 
mouth and replaces it with other foot).

Perhaps a clearer definition:
Static Objects are data typed at compile time.  Early
Dynamic Objects are data typed at run time.     Late


More information about the fpc-devel mailing list