Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Working around the brittle bindings problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-01-25 (04:16)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Working around the brittle bindings problem
On Friday 25 January 2008 02:31:13 you wrote:
> This looks like a good idea. This way you can choose the set of
> functions you depend upon. This means essentially copying and
> trimming down mlis. Then you just need to provide the source code for
> the linking bits, that is a big functor application.
> This would protect you from checksums changing due to the addition of
> new functions, or from compatible changes in function types (i.e.,
> types are equal according to ocaml expansion rules). This will not
> protect you from a real change in function type at the interface (like
> the addition of a new tag in a type, or of an extra optional
> argument), or from a change in the compiler itself.
> If you want maximal protection, you should apply the same approach to
> standard library modules too, so that compiler changes that do not
> alter the .cmi format would be allowed, but this is going to be painful.
> There may also be a performance hit as the function calls get a bit
> more costly (this should only matter for really fast functions, not
> for openGL calls).

Awesome! I'll try to get this done ASAP. I think I'll leave the dependency 
upon the compiler because it would be too painful to remove, as you say, but 
the rest should be doable and will make my recompilation nightmares a thing 
of the past!

I'll post back with my findings... :-)

Dr Jon D Harrop, Flying Frog Consultancy Ltd.