<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV> Hi Chriss,</DIV>
<DIV> </DIV>
<DIV>Personally I favor reference counted objects. While there are interfaces as
you pointed, and in Delphi you can even use smart pointers now, there is still a
lot of cases when you need to use objects, and have to manually free them.</DIV>
<DIV>In single threaded environment that is not such an issue, but in parallel
and heavily multithreaded environments, reference counting is a life
saver.</DIV>
<DIV>Just for that at the moment we have to declare gazillions of additional
interfaces which slows the development considerably. After all even after we
switched to the new RTTI, generics, and attributes, we barely succeeded to
reduce our code from 4 mln lines of code to ~800K and it still is time consuming
to maintain :-( .</DIV>
<DIV>Anything that can reduce the code base further and speed up our development
is important for us, as I would guess for anyone else.</DIV>
<DIV> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">With best
regards,<BR>Boian
Mitov<BR><BR>-------------------------------------------------------<BR>Mitov
Software<BR>www.mitov.com<BR>-------------------------------------------------------</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=iz.iznogood@gmail.com
href="mailto:iz.iznogood@gmail.com">Chriss Kalogeropoulos</A> </DIV>
<DIV><B>Sent:</B> Saturday, September 20, 2014 4:02 AM</DIV>
<DIV><B>To:</B> <A title=fpc-devel@lists.freepascal.org
href="mailto:fpc-devel@lists.freepascal.org">FPC developers' list</A> </DIV>
<DIV><B>Subject:</B> Re: [fpc-devel] Suggestion: reference counted
objects</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<P dir=ltr>Hi all,</P>
<P dir=ltr>Why would anyone want something like that? Both languages have
interfaces that can be used for auto reference counting and they also provide us
with a very powerful abstraction mechanism.<BR>This also adds overhead on the
performance (and locking calls) which might be important in some cases like
embedded devices.</P>
<P dir=ltr>The fact that embarcadero added this feature unconditionally is a
huge mistake IMHO unless they needed it for some compatibility reasons with java
for android or iOS or just marketing, I don't know. If someone knows any other
reason please post it on the list.</P>
<P dir=ltr>It's the same bad decision they made with the zero based strings, at
least the used a switch for that.</P>
<P dir=ltr>The only gain I can see from that is that with objects someone can
use reference counting and still benefit from some aggressive optimisation like
inlining which is not possible for interfaces. The same with simple properties
that they need getter and setter methods in interfaces that cannot be optimized
but in objects it might be possible or they can access the data member
directly.</P>
<P dir=ltr>In my opinion this is a very small gain compared to the huge change
in the language semantics that you propose.</P>
<P dir=ltr>Chriss<BR></P></DIV></DIV></DIV></BODY></HTML>