[fpc-pascal] Check In Interface Type Helpers

Sven Barth pascaldragon at googlemail.com
Wed Aug 23 11:18:54 CEST 2017


Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
>
>
>
> On Tue, 22 Aug 2017, Anthony Walter wrote:
>
>> I just wanted to point out that revision 37023 Sven added type helper
>> support for interfaces.
>>
>> Good job and thank you Sven!
>>
>
> I'm having trouble understanding why this could be useful (apart from
completeness).
> The only thing I can come up with is adding properties:
>
>   Property SomeProp : TSomeType Read GetSomeProp Write SetSomeProp;
>
> where GetSomeProp and SetSomeProp are part of the interface.
>
> Any other examples ?

It's the same as for the other kinds of helpers: being syntactic sugar.
E.g. if I have an interface that has two methods that both return a string,
but more often than not I need a combination of both results. The previous
solution would have been a global function, now I can also do a helper with
a method.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170823/4ae1e090/attachment.html>


More information about the fpc-pascal mailing list