From: Nicolas C. <war...@fr...> - 2004-04-09 19:02:38
|
> > No, the problems I have with this idea are: > > > > 1) You'd still have C dependencies, breaking the Ocaml-only nature of > > ExtLib. > > > > 2) You would still have to deal with impedence mismatches- C API's that > > don't translate well into Ocaml. For example, routines which take > > pointers to variables to return more than one value. Or APIs that depend > > upon the "shape" of variables (for example, using unions). Or that want > > to use Macros to inline code. I'm not sure what all the impedence > > problems might be. > > > > Even if i am not an Extlib developper, i permit myself to raise my > voice... Sorry if you don't agree. > > I think extlib is a great project by the 100% Pure Ocaml coding style. I > think putting 1 byte of C in it is not a good idea. It will break a lot > of things, need to be maintained over a lot of arch ( including Ms Win, > Linux, Unix, Irix et al ). I think it is far too complicated to be > interessant. > > My opinion, is that you can create a new repository especially for > project related to extlib... It will be far more simple, and will gives > dependency on C only on this external module. Just to give you an > example : > CVSROOT/ > extlib/ > extlib-io-zip/ > extlib-io-aes/ > ... > > I think it is the less complicated you can do... > Off course, the compilation will require to load other module than > extlib, but i think it is worth the effort. The point about EmuC is : - do we write and maintain C stubs for each of the external librairies we might need or - do we use EmuC only and write stubs in OCaml using EmuC If we choose the EmuC way, then we have only one - quite small - C file to maintain. That's might still be quite big, so maybe we don't have to put EmuC in the default install at the beginning, but after we have stubs for let's say 5 or more librairies, it will be worth it. Other choice is to keep away from C, but there is some times (zlib, cryptography, ipv6 support, and many others... ) that we can't or that the effort to write it again in ocaml is simply to big compare to writing stubs and maintaining EmuC. I don't want also to put C code into ExtLib, but maybe one day we'll have to :-) Regards, Nicolas Cannasse |