caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus@oefai.at>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Ocamlmakefile and Lablgtk
Date: Wed, 14 Nov 2001 15:10:45 +0100	[thread overview]
Message-ID: <20011114151045.A10467@chopin.ai.univie.ac.at> (raw)
In-Reply-To: <20011114225746Z.garrigue@kurims.kyoto-u.ac.jp>; from garrigue@kurims.kyoto-u.ac.jp on Wed, Nov 14, 2001 at 22:57:46 +0900

On Wed, 14 Nov 2001, Jacques Garrigue wrote:
> From: Markus Mottl <markus@oefai.at>
> > But why not just link the module in the right order with the rest of
> > the library? Then things will be initialized as required. Or are there
> > circumstances where you don't want initialization?
> 
> This is exactly the reason.
> Take for instance Unison. It is linked with lablgtk, but does not want
> to initialize GTK+ when used in text mode. This is very important,
> otherwise you would need an X-server running everytime you start
> Unison.

Ok, I see, I didn't know what kind of initializations have to be
performed.

> While Unison was the original reason, I think it is indeed good
> practice to initialize by hand, without linking gtkInit.cmo.

I agree.

> So the rule of the thumb is: use gtkInit.cmo if you are developping
> with the toplevel and all your program is included in one file, but
> switch to explicit initialization as soon as it gets bigger. This way,
> OCamlMakefile should not be a problem :-)

OCamlMakefile respects the order of files as defined by the user to
exactly avoid this problem of initialization order in the presence of
side effects. So blaming OCamlMakefile for wrong linking order is not
an excuse :-)

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-14 14:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12 13:36 Johann Spies
2001-11-12 17:59 ` Markus Mottl
2001-11-12 22:17   ` Johann Spies
2001-11-12 23:40     ` Markus Mottl
2001-11-13  8:10       ` Florian Hars
2001-11-13  8:54         ` Markus Mottl
2001-11-14 13:57           ` Jacques Garrigue
2001-11-14 14:10             ` Markus Mottl [this message]
2001-11-13 12:37         ` Johann Spies

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=20011114151045.A10467@chopin.ai.univie.ac.at \
    --to=markus@oefai.at \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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;
as well as URLs for NNTP newsgroup(s).