[fpc-devel] Allow record helper inheritance in Delphi mode
Ondrej Pokorny
lazarus at kluug.net
Fri Sep 1 12:22:41 CEST 2017
On 01.09.2017 12:15, Maciej Izak wrote:
> 2017-09-01 11:41 GMT+02:00 Stefan Glienke <sglienke at dsharp.org
> <mailto:sglienke at dsharp.org>>:
>
> Again you will cause unnecessary headaches because now your helper
> has the dependency of the builtin and the third party one.
> How would third party one and third party two implement them? They
> both probably would extend the builtin one. Which one can you use
> in your code then?
> Yes, the one that comes last in the uses. What if you want to use
> functions from both? Out of luck again.
>
> Inheritance regardless what form is never is the best option here.
> I think "ancestor list" is just a misnomer in the documentation as
> it cannot be a list but only one in case of class helper.
>
>
> The control of modules order in uses section can turn programmers life
> into real hell for type helpers. I think that new directive
> $EXPLICITHELPERSÂ should help :
That's effectively just another way to write:
TMyHelper = class helper (TH2, TH1) // scope for helpers limited to TH2, TH1
:P
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170901/f9c06de3/attachment.html>
More information about the fpc-devel
mailing list