<div dir="ltr">To somebody (probably Sven):<br><br>In FPC there is concept of stack based objects (object) <span id="result_box" class="" lang="en"><span class=""></span> <span class="">that behave like</span> <span class="">classes</span> <span class="">(</span><span>with</span> <span class="">inheritance</span><span>)</span><span></span></span>?<span id="result_box" class="" lang="en"><br><span class="">Why not</span> just extend this object with support for <span class="">constructors and</span> <span class="">destructors</span><span>, and</span> <span class="">there is no need</span> <span class="">for</span> <span class="">the ARC</span><span class="">?</span></span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 22, 2014 at 2:05 PM, Hans-Peter Diettrich <span dir="ltr"><<a href="mailto:DrDiettrich1@aol.com" target="_blank">DrDiettrich1@aol.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sven Barth schrieb:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 22.09.2014 09:47 schrieb "Michael Schnell" <<a href="mailto:mschnell@lumino.de" target="_blank">mschnell@lumino.de</a> <br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 > Why not use "interface" to add ref-counting to an object ? This seems to work nicely even though the name "interface" in not "speaking" on that behalf.<br>
<br>
Because you'll need to declare an interface for each class you want to have reference counted so that you can access its methods, properties, etc.<br>
</blockquote>
<br>
This overhead could be eliminated by another syntax extension, like<br>
  TMyARCclass = interface(TObject)<br>
where the Compiler could allow for implementations of the declared methods just as for<br>
  TMyARCclass = class(TObject)<br>
bridging the gap between traditional (strictly declarative) interfaces and classes (including implementations), with or without ARC.<br>
<br>
DoDi<br>
<br>
______________________________<u></u>_________________<br>
fpc-devel maillist  -  <a href="mailto:fpc-devel@lists.freepascal.org" target="_blank">fpc-devel@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/<u></u>cgi-bin/mailman/listinfo/fpc-<u></u>devel</a><br>
</blockquote></div><br></div>