Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!ai-lab!zurich.ai.mit.edu!markf From: markf@zurich.ai.mit.edu (Mark Friedman) Newsgroups: comp.lang.scheme Subject: Re: Making programs out of modules in Scheme Message-ID: Date: 19 Jun 91 14:45:22 GMT References: <6384@goanna.cs.rmit.oz.au> Sender: news@ai.mit.edu Reply-To: markf@zurich.ai.mit.edu Organization: M.I.T. Artificial Intelligence Lab. Lines: 41 In-reply-to: ok@goanna.cs.rmit.oz.au's message of 19 Jun 91 07:11:20 GMT In article <6384@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: I just received E-mail from someone who believes that Scheme as it currently stands does not have the facilities required to build a library out of modules. I claim that he is wrong, that Scheme as it stands provides everything we need to build programs out of modules that do not interfere with each other's name space. ... (library 'register ModuleName:symbol FileString:string) ... (library 'define ModuleName:symbol ExportName:symbol Value:any) ... (library 'require ModuleName:symbol) ... (library 'value Modulename:symbol ExportName:symbol) ... The implementation of (library mod . rest) is so trivial that it is left as an exercise for the reader. Without LOAD it is not so trivial. LOAD is not in IEEE standard Scheme (at least not in my draft). This suffices to show that the LANGUAGE permits the construction of modular libraries. Certainly the language permits it. The question is whether the standard language has sufficient capabilities to build a module system. Without LOAD or EVAL I don't see how to do it. -Mark -- Mark Friedman MIT Artificial Intelligence Lab 545 Technology Sq. Cambridge, Ma. 02139 markf@zurich.ai.mit.edu