[fpc-pascal] cloning data containers

Marc Santhoff M.Santhoff at web.de
Sun Dec 28 02:36:40 CET 2014

On So, 2014-12-28 at 03:08 +0200, Chriss Kalogeropoulos wrote:
> Hi again,
> Sven made a good point on records. However most of the time it is easier to

It took me some time to understand, he did actually.

> use classes.

Not possible on old code, new stuff is using objects for sure.

> Also you might be able to write some code to copy the property values using
> rtti so you can avoid the read/write component and the extra overhead. It
> will work for TPersistent descendants but might be tricky to cover all
> cases.

If the base class is or can be TPersistant that would work.
I like the idea, having done sth. like it way back in the past when
Delphi 1 (in words: one) was new. The documentation was kind of bad,
sparse at least.

> Your proposal on the name/value pair reminds me of Qt but in the Delphi/Fpc
> world it is done with rtti.

Interesting, if Qt really does it like that. Some code to stare at. :)

Marc Santhoff <M.Santhoff at web.de>

More information about the fpc-pascal mailing list