[fpc-devel] interfaces vs classes in dll
Michael Van Canneyt
michael at freepascal.org
Fri Nov 30 14:19:51 CET 2007
On Fri, 30 Nov 2007, Mattias Gaertner wrote:
> On Fri, 30 Nov 2007 13:22:54 +0100 (CET)
> Michael Van Canneyt <michael at freepascal.org> wrote:
>
> >
> >
> > On Fri, 30 Nov 2007, Paul Ishenin wrote:
> >
> > > Michael Van Canneyt wrote:
> > > > No-one. The DLL must be recompiled anyway if you use packages.
> > > > And this is also true if you use interfaces, so using interfaces
> > > > will not solve the problem you mention.
> > > >
> > > Only if compiler (who provides package system) changed. Ide changes
> > > will not cause recompilation of plugins in case of interfaces.
> >
> > Nono. If the LCL/FCL/RTL changed or whatever, then you must recompile
> > the DLL as well, since it uses these packages. This will IMHO be 99%
> > of all realistic cases.
> >
> > If *only* the IDE interface changed, and only that, then you are
> > right. But in my opinion this will be less than 1% of all possible
> > cases. So the decision to use interfaces to cover this 1% is IMHO not
> > founded.
> >
> > It's like in Delphi.
> > With each release and update of Delphi, you must recompile all
> > design/runtime packages, whether the IDE interface changed or not.
> > (and it uses interfaces too)
>
> Conclusion:
>
> A plugin without source will only work with a specific lazarus release
> OR if the plugin does not share any code.
>
> A plugin with source can be simply recompiled.
>
> Interfaces can be more flexible when extending IDE classes. At the
> moment there are only few classes where this makes sense. Maybe these
> should be changed to interfaces. But the rest can remain classes.
>
> Correct?
Seems correct to me.
Whether you should actually do this change is another matter.
I think there are more useful things that should be done.
But you do the work, so you decide. Open source at it's best :-)
Michael.
More information about the fpc-devel
mailing list