[Lazarus] Strange dependency of units

Marco van de Voort marcov at stack.nl
Mon Apr 2 23:31:56 CEST 2012


On Mon, Apr 02, 2012 at 10:42:42AM +0200, Mattias Gaertner wrote:
> > > AFAIK this was only the "object" syntax, not the "class" syntax. IMO
> > > the "object" syntax is too limited to be called true OOP. 
> > 
> > TP Object syntax was perfectly valid oop. It provided mechanisms for all
> > important OOP features:
> > 
> > 1. combining data and behaviour (code)
> > 2. instantiation - one could instantiate multiple objects
> > 3. encapsulation - private, public
> > 4. polymorphism  - provided by inhertiance + virtual methods.
> 
> Ah, I thought the virtual methods were missing in TP.

No. Heavily used in Turbo Vision. Only difference is that it does not know
the virtual - override distinction, both are flagged with "override;".

For me if I go from TV to *CL, the difference can be felt more that TV has a
lot of pchar trickery (to workaround shortstring limits and because it is a
C++->Pascal port), and because in TV you have to write code to stream the
objects and separately register them.

(the registration of an object for streaming requires you to pass pointers
to the read and write methods, the framework makes sure they are properly
called using self etc)

The event system delegation is also slightly different, but harder to
describe that from memory.




More information about the Lazarus mailing list