Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!swrinde!howland.reston.ans.net!EU.net!julienas!news.fnet.fr!ilog!news
From: davis@ilog.fr (Harley Davis)
Subject: Re: code units
In-Reply-To: mw@ipx2.rz.uni-mannheim.de's message of 9 Nov 1994 18:58:16 GMT
Message-ID: <DAVIS.94Nov10111651@passy.ilog.fr>
Lines: 41
Sender: news@ilog.fr
Nntp-Posting-Host: passy
Organization: Ilog SA, Gentilly, France
References: <37ttid$jv@agate.berkeley.edu: <ASAH.94Oct17153014@ginsberg.cs.berkeley.edu>
	<DAVIS.94Nov2134356@passy.ilog.fr> <39r649$n39@darum.uni-mannheim.de>
Date: 10 Nov 1994 10:16:51 GMT


In article <39r649$n39@darum.uni-mannheim.de> mw@ipx2.rz.uni-mannheim.de (Marc Wachowitz) writes:

   > I think you underestimate the complexity of the initialization
   > problem.  Unless you seriously restrict the usefulness of the module
   > system, top-level variable definitions will be able to call arbitrary
   > functions in the module.

   Yes; obviously, all initialization expressions must be executed when the
   module is first loaded, and the functions used by them need to be there.
   If private functions are only used in initialization code, it might be a
   good idea to collect them after they are no longer used (though this may
   be too much work in some environments).

   If modules already provide name-space management and information hiding,
   the most uses of defining top-level functions within a nested expression
   would disappear; essentially only the precomputation of complex data may
   remain. I think that will leave enough cases to make this kind of system
   worth the effort (if one is short of memory in the first place).

I guess our experiences with this sort of system differ; in Ilog Talk,
function objects are very small and the code is in shared libraries.
So we find that most of the working memory space taken up by modules
is in the user-defined data (including not only initialized variables
but things like class objects).  In addition, most modules tend to be
fairly small.  For us, then, it is not worth implementing partial
module loading (although the idea is intriguing).  The situation is
quite different if your function code --- which accounts for the mass
of a module's bytes --- is in normal memory and/or modules can get
big.

-- Harley Davis
-- 

------------------------------------------------------------------------------
Harley Davis                            net: davis@ilog.fr
ILOG S.A.                               tel: +33 1 46 63 66 66
2 Avenue Gallini, BP 85                fax: +33 1 46 63 15 82
94253 Gentilly Cedex, France            url: http://www.ilog.fr/

           Ilog Talk information: info@ilog.com
