[fpc-pascal] Lazarus and FPC integration

Florian Klaempfl F.Klaempfl at gmx.de
Sun Oct 30 23:13:10 CET 2005

Agustin Barto wrote:

> On 10/30/05, Florian Klaempfl <F.Klaempfl at gmx.de> wrote:
>>Agustin Barto wrote:
>>>I was talking about design. One example? Polymorphism with primitive
>>>data types can get really messy really fast with ObjectPascal. It's
>>>not easy, for instance, to have a generic data structure that can
>>>store *any* primitive data in a type-safe way.
> If Variants could store objects and interface instances, maybe. 

They can? Simply use custom variants.

> I
> could use pointers too, but I really don't want to implement poor
> men's polymorphism :)
> I solved the problem using a single-rooted wrapper hierarchy (java
> style). It's not elegant nor efficient, 

Which isn't java either ...

> but it saved me from writing
> the same code over and over, and having to deal with pointers, or
> variants.

More information about the fpc-pascal mailing list