[fpc-pascal] Check In Interface Type Helpers
Marcos Douglas B. Santos
md at delfire.net
Wed Aug 23 14:26:10 CEST 2017
On Wed, Aug 23, 2017 at 6:18 AM, Sven Barth via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
> Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
>>
>>
>> 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.
If I understood right, I could have a Interface with 1 method and
maybe 3 classes that implements this method. But one of theses classes
could use an interface helper to add 1 or more methods. All instances
(variables) will be interface-typed but in that last case, the
instance will have more that 1 original method.
Am I right?
(please say yes)
Best regards,
Marcos Douglas
More information about the fpc-pascal
mailing list