[fpc-devel] Generics.Collections as package for Lazarus or package for FPC RTL

Sven Barth pascaldragon at googlemail.com
Fri Jan 29 08:08:10 CET 2016


Am 29.01.2016 01:53 schrieb "silvioprog" <silvioprog at gmail.com>:
>
> On Thu, Jan 28, 2016 at 7:34 AM, Sven Barth <pascaldragon at googlemail.com>
wrote:
> [...]
>
>> The format of interface VMTs could also differ per platform so
considering that as more stable only holds true because of what we
currently support.
>
>  Sorry for ask here, but, don't you recomment to use interfaces? I'm
making a project and I'm planning to use some COM interfaces to make
something a list adapter.

As long as you don't pull stunts as Maciej here you don't have to worry :)

>>
>> The more stable approach would definitely be the one that does not rely
on implementation details, but only on the specified, documented language
behavior (bugs not withstanding of course), thus the approach I've
mentioned above.
>>
>> I consider the approach with manual interfaces as hackish. Period.
>
> [...]
>
> What is manual interfaces, does it mean CORBA interfaces?

No. Corba interfaces are non-reference counted interfaces. Manual
interfaces means that an interfaces VMT had been created by hand and passed
around as an interface instance.

> I'm asking about using interfaces because I could easily change my
project to use abstract classes, however I don't know if the interfaces
choice can be a good choice.
>

There isn't that much difference in using interfaces or abstract classes.
Only the reference counting of COM interfaces comes to mind and then you
should avoid using the class instance instead of its interfaces.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160129/08a7fe38/attachment.html>


More information about the fpc-devel mailing list