static versus dynamic linking (about ffi)

Pupeno pupeno at pupeno.com
Tue Oct 12 12:18:27 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday October 12 2004 08:39, Paul Dufresne wrote:
> 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.
I first starting doing a BSD Scokets wrapper... it seems that is better to 
write a wrapper over a cross-platfor wrapper, like SDL_net. But, by doing BSD 
Sockets I've learned a lot that allowed me to concentrate on other problems 
when doing SDL... and doing SDL also tought me a lot, that will allow me to 
do better things. It's not wasted, I've learned.

> 2) I think Pupeno is using .h files.
> I doubt we will want to use them in the long run.
We wouldn't want a lot of things in the long run, but we can make all of that 
now.

> 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.
Ok, I know that.

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

> For these reasons, I believe we will prefer to add a dlopen primitive to
> Slate
> to dynamically link with libraries.
That might be a good thing... you are welcome to do it, just open a text 
editor and start codding.
- -- 
Pupeno: pupeno at pupeno.com - http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBbC4HfW48a9PWGkURArw6AJ9SRQCN6O8ftS5pZ8gJN3b6YTBlsgCeNxRM
ZSvnojn5ZMbgFcYiXpRPaY4=
=bGzD
-----END PGP SIGNATURE-----




More information about the Slate mailing list