[fpc-devel] Dnamic packages support

Michael Van Canneyt michael at freepascal.org
Sat Nov 3 18:54:08 CET 2007



On Sat, 3 Nov 2007, Florian Klaempfl wrote:

> Leonardo M. Ramé schrieb:
> > Reading a post in "public.mseide-msegui.talk", the mseide discussion
> >  list, I found this:
> > 
> > "Florian has committed the beginning of dynamic packages support".
> > 
> > With "Dynamic Packages" you mean a platform independent way of
> >  implementing something similar to
> > .Dlls (or .bpl)? without creating each library its own memory manager?,
> >  where objects can flow
> > across all libraries without problems?
> > 
> 
> If it is finished, it would be something like this yes. However, I'am
> not convinced of the use of dyn. loaded packages for an OSS project so I
> played only with it.

Hm. I don't see what OSS or not OSS has to do with it ?

Packages are IMHO a pre-requisite for any good plugin system.
It allows you to enable/disable certain features of a program based on the 
particular system you install the package on, without having to recompile
your complete application for this particular system.

Lazarus is an IDE and therefore recompilation is IMHO an acceptable solution,
since the person using it is a developer (even so, this would be too much asked
for most devels in my company) but the same cannot be said for most end-user 
applications, OSS or not. For example, I don't think we can expect an end 
user to recompile XMMS if he decides to use ogg vorbis files instead of .mp3...

Apart from the recompilation issue, packages allow you to have type-safety in 
plugins. A normal dll does not offer this (which is why techniques such as 
COM are used on Windows). I could not build my day-time job application if 
packages did not exist...

So I do think packages are really a must; I lack the skill to implement them
in the compiler, but will be glad to assist in any design issues or even 
creating any RTL code that you would need, if this is the problem for you.

Michael.


More information about the fpc-devel mailing list