Version française
Home     About     Download     Resources     Contact us    
Browse thread
Best way to choose an implementation of a lib ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] How to compile different implementations of the same lib

> A result is that there cannot be any inlining between client and
> library. Actually, this is even worse than that: this also prevents
> direct function calls, as the concrete information about functions is
> also in the .cmx. All calls will have to go through closures. Just
> like when you call a function received as parameter, or inside a
> functor.
> 

I you actually decide that the dependancy is for .cmx instead of .cmi in
the makefile (which is mandatory for nativecode) with proper -I option,
it should also work (maybe with a make clean when you switch
implementation) ?

May be I still do not get the problem

Anyway, there should be better support for implementation choice at link
time, because this is a nice feature of ML ...

> This suggests the other evident alternative: write the client as a
> functor. This will not be slower! But this can be more painful if
> there are several modules in the client...
> 
> Jacques Garrigue
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 


-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------