Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: mottl@miss.wu-wien.ac.at (Markus Mottl)
Cc: caml-list@inria.fr
Subject: Re: convenient features
Date: Thu, 29 Jun 2000 18:57:53 +0200 (MET DST)	[thread overview]
Message-ID: <200006291657.SAA11050@pauillac.inria.fr> (raw)
In-Reply-To: <20000628192916.B18617@miss.wu-wien.ac.at> from Markus Mottl at "Jun 28, 100 07:29:16 pm"

> On Wed, 28 Jun 2000, David Chemouil wrote:
> > 1. One thing that really bothers me is the obligation to put object
> > files in the good order, when linking them.
> 
> To my knowledge the reason for this is that you might otherwise have
> difficulties with linking, because some library may contain a module
> with the same name. By requiring correct order of files during linking,
> it is possible to "override" the names provided in libraries or earlier
> on the command line. E.g., if you want to use a different implementation
> for sets, just link against some other set.cmo: it overrides whatever
> was used before.

You're right, but also don't forget that toplevel expressions in
modules are executed in the order of presentation (and recursively,
that is in each module, for all the modules that are linked together).

This way, if init.ml contains the expression initialize ();;
and main.ml contains exit 0;; as its last phrase, then linking init.cmx
before main.cmx ensures that initialization is performed before
exiting the program.

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/




  reply	other threads:[~2000-06-29 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-28  9:44 David Chemouil
2000-06-28 17:09 ` David Brown
2000-06-28 17:29 ` Markus Mottl
2000-06-29 16:57   ` Pierre Weis [this message]
2000-06-30  9:22     ` Christophe Raffalli
2000-06-30 18:10       ` Jean-Christophe Filliatre
2000-06-29  8:55 ` David Mentré
2000-06-29  9:19 ` Daniel de Rauglaudre
2000-06-30  0:42   ` Max Skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200006291657.SAA11050@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=mottl@miss.wu-wien.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox