[fpc-pascal]Linked List/ pointers/ casting/ OOP Question

Ron Weidner xecronix at yahoo.com
Sun Jul 11 16:29:16 CEST 2004

> Your design is the right one for the problem, -and-
> FreePascal supports 
> this design very well. What you seem to miss is the
> correspondence 
> between your design ideas and FreePascal's syntax
> and semantics.
> Sorry, but before proceeding I ask you to make a
> decision (because else 
> writing any code examples might be wasting our
> time):
> FreePascal offers two different approaches to your
> design: Objects and 
> Classes. Objects is what you're using now. Classes
> are essentially 
> pointers to Objects, but they also simplify the
> syntax, and they allow 
> pointer types to inherit from each other. This
> latter capability 
> perfectly addresses the problem of choosing the
> right type for the 
> parameter X in AddWidget(X). So, before proceeding,
> please decide if you 
> want to continue using good old Objects, or if you
> want to switch to the 
> newer and more powerful Classes. If unsure, choose
> Objects. Also, if you 
> cannot easily change the declaration of a widget
> because it's legacy 
> software, choose Objects. I'll then post code
> examples using the 
> approach you choose.
> Anton.

When you put it like that, it seems silly to use
Objects over Classes.  I've only written 4 files for
this project, and they could probably be easily ported
from Objects to Classes.  So if what you are saying is
that the Classes way of solving this (and like)
problem, and since I have no legacy software to
support, I would love to see a working example of this
code done with Classes.



Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

More information about the fpc-pascal mailing list