[fpc-pascal]FP newbie

Michael Van Canneyt michael.vancanneyt at wisa.be
Thu Nov 13 15:16:26 CET 2003

On Thu, 13 Nov 2003, Demian Lessa wrote:

> Peter,
> Thanks for clearing things a little further!
> I see that many responses refer to Delphi compatibility. I understand
> that the FP compiler has a switch that tells it to compile the pascal
> code as Delphi code. In that sense, I'd expect FP to provide a superset
> of the Object Pascal dialect. And that is true indeed!
> FP offers operator overloading, which is not an Object Pascal feature.
> I'm not yet familiar with the compiler but I guess many other features
> are also particular to FP.
> Many of us (Delphi/Kylix developers) find many features missing in the
> Object Pascal compiler and we see FP is a real chance to get those
> features working. RTTI, for instance. Why shouldn't all objects have
> RTTI? Why should only TPersistent descendants have it?

As to that, the answer is simple: RTTI for all objects would blow up
your executable. RTTI information takes up a *lot* of space in your
executable.  It's a burden, and people who don't need it should have the
chance not to use it. This is impossible if you force RTTI in TObject.

Since TPersistent descends directly from TObject, I don't see the
problem. If you need it, descend from TPersistent. If you don't:
descend from TObject.


More information about the fpc-pascal mailing list