Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: convenient features
Hello,

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:
   a.ml depending on c.ml (a.ml contains e.g. open C)
   b.ml independant
   c.ml 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.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/