On 10/30/05, Florian Klaempfl <[EMAIL PROTECTED]> 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. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal