static versus dynamic linking (about ffi)

Paul Dufresne dufrp at hotmail.com
Tue Oct 12 04:39:38 PDT 2004


Frankly, I worry a bit about Brian pushing for code.

It is very impressive to see Slate do graphics, but I am afraid,
most all the code will have to be thrown and rewrote later.

I have mainly two reasons:

1) Pupeno is asking on IRC, how he will do with all the type conversions.
Doing it, now ad hoc in the code, will probably means we will have to
rewrite it later to use some more generic conversions methods.
We will face these conversions for every library we will want to use.

2) I think Pupeno is using .h files.
I doubt we will want to use them in the long run.
Because using them, means that every libraries must be installed before
using Slate. If we do more than one port (backend) (other than SDL), then
we will have to have every these libraries to be present, even if one does
not need them. Also, this would means conditionnaly including them,
depending on the platform, as some libraries may not exist on all.

Also, every change to a module using a lib, would means to rebuild the VM.

For these reasons, I believe we will prefer to add a dlopen primitive to 
Slate
to dynamically link with libraries. A call that could easily fail, if the 
library is
absent, but just installing, will make it work, without rebuilding Slate.

So, I suggest you don't use .h files. Unless you want a statically linked
ffi system.

--Paul

_________________________________________________________________
Gardez le contrôle grâce à la protection contre les fenêtres pop-up 
articulée sur la technologie brevetée Microsoft SmartScreen 
http://join.msn.com/?pgmarket=fr-ca&page=features/popup Commencez dès 
maintenant à profiter de tous les avantages de MSN Premium et obtenez les 
deux premiers mois GRATUITS*.




More information about the Slate mailing list