[fpc-devel] Management operators : Copy and Clone confusion...

Maciej Izak hnb.code at gmail.com
Thu Jan 19 09:58:16 CET 2017


Hi,

in patch/feature proposed in http://bugs.freepascal.org/view.php?id=30687
we have Copy/Clone operators naming convention proposed by Florian (my
initial idea was AddRef/Copy).

I'd like to say that Copy/Clone naming convention is terrible in practical
usage. :( As the main author I have many troubles and I have always
confusion >.< I always must to check which is for adding reference and
which one is for copying...

For example Paul Ishenin said in previous discussion ("ANN: Management
operators - final patch") : I know Florian insisted on Copy and Clone names
but still for my taste it would be the best to have conformity between
compiler and RTL.

In current FPC implementation of management operators "Copy" operator is
*always* used for increasing reference count and "Clone" operator is used
to create copy... In this area I have objections for my own patch.

Maybe someone have other ideas? Maybe we could back to AddRef/Copy which is
RTL compatible and is more "real life" friendly?

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170119/507a2798/attachment.html>


More information about the fpc-devel mailing list