[fpc-pascal] Lazarus and FPC integration
Agustin Barto
abarto at gmail.com
Sun Oct 30 23:08:20 CET 2005
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.
>
> Variants?
>
If Variants could store objects and interface instances, maybe. 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, 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