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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-20 (07:18)
From: Jeff Henrikson <jehenrik@y...>
Subject: Re: [Caml-list] global record
The full generalization of this is dynamic scoping, as you may know.  
There's a discussion of the implementation in emacs in the emacs 
manual.  Not thread safe but can be made so with an immutable binary 
tree, eg the Map module.  You could map either strings or polymorphic 
variants to your config value type, probably a regular variant.  I'm not 
sure how much of a performance savings polymoprhic variants would be 
over strings.

For a couple of other approaches see


Andreas Biegert wrote:

> Hi,
> I am developing a bioinformatics sequence analysis application which
> contains about 20 modules. One of those modules, the 'Par' module,
> encapsulates a record of about 30 configuration parameters needed
> throughout the whole application. The parameter record is mostly
> static but some values can be overwritten by command-line options. Is
> there a way to make the (possibly modified) parameters record globally
> accessable throughout all modules? This would be much more convenient
> than having to pass the parameters record to virtually all functions
> in my application. THX for helping.
> Andreas
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: