<p>Am 22.09.2014 14:30 schrieb "Hans-Peter Diettrich" <<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a>>:<br>
><br>
> Sven Barth schrieb:<br>
><br>
>> Am 22.09.2014 09:47 schrieb "Michael Schnell" <<a href="mailto:mschnell@lumino.de">mschnell@lumino.de</a> <br>
><br>
><br>
>> > 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>
><br>
><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.</p>
<p>I don't think this would be a good idea. Besides confusing newcomers there also the problem when to stop when generating an interface. Only the class declared? Also its perent classes? No, better make classes themselves reference counted and be done with it.</p>
<p>Regards,<br>
Sven</p>