[fpc-devel] Management operators AddRef and Copy vs Copy

Anthony Walter sysrpl at gmail.com
Mon Apr 18 11:42:13 CEST 2016


Do the source and dest types need to match? How about:"CopyFrom"? As it is
right now you already have type parity between types such as floats <-
integer and string <- char, so why not between TBar <- TFoo?

class procedure TBar.CopyFrom(constref Source: TFoo; var Dest: TBar);

Then this begs question, what's the difference between AutoCopy/CopyFrom
and:

class operator TBar.Implicit(const Value: TFoo): TBar;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160418/2f4792d0/attachment.html>


More information about the fpc-devel mailing list