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
convenient features
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-06-29 (17:11)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: convenient features

On Wed, Jun 28, 2000 at 11:44:54AM +0200, David Chemouil wrote:

> 1. One thing that really bothers me is the obligation to put object
> files in the good order, when linking them. As it is possible to
> generate the dependency graph (ocamldot does it), wouldn't it be
> possible for the linker to "flatten" it, in order for it to find alone
> the good order?

I personnally consider that it would be a good idea, but there is a little
problem. Let's consider: depending on ( contains e.g. open C) independant independant

Let's suppose that you write:
    ocamlc a.cmo b.cmo c.cmo

Do Ocaml has to do:
    ocamlc c.cmo a.cmo b.cmo
    ocamlc b.cmo c.cmo a.cmo

The first solution respects the initial relative order "a.cmo b.cmo" but
not "b.cmo c.cmo". It is the contrary in the second solution.

If Ocaml chooses for you, it can be a problem if you want to make side
effects in some order while executing these modules.

Well, it could be an option of Ocaml...

I have been inspired by this question by my genealogy software GeneWeb
when I have to sort children by birth dates when not all of them have some.