Delphi classes (Was: bugs, incompatibity, function attributes)_(re)

Thu, 3 Jul 1997 07:34:13 -0700 (PDT)




On Thu, 3 Jul 1997, Larry Carter wrote:

> > > 6. All classes to have the same ultimate ancestor object.
> > 
> > The same discussion as with objects recently... ;-)
> > Is this really necessary (if so, for what?), or is it sufficient if all
> > classes in a given library use the same ancestor by convention?
> 
> In Delphi, the common object ancestor (TObject) provides the most basic
> methods and properties that ALL objects need (creation, destruction,
> etc.).  These are the methods/properties that are unlikely to be
> overridden (its rare that you would need a different destructor for
> example) and having a common ancestor provides the programmer with a ready
> to go foundation for his/her objects.  I think a common ancestor is the
> right way to go.

When I actually started to think about this, I realized how this could be
a problem.  In Delphi, this commmon object works great becuase it provides
all the basic machinery neccessary for all objects, however, this is
machinery that is specific to the Intel running Windows environment, the
memory model etc.  An object of this type in GPC would probably be very
bloated, making all its decedants bloated, becuase of all the different
environments it would have to handle.  Perhaps a library of foundation
objects for each OS??  Especially since this really has little to do with
the compiler itself anyway!  :)

Larry Carter
lcarter@powerslave.jf.intel.com


Larry Carter (lcarter@powerslave.jf.intel.com)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es