kend@data.UUCP (Ken Dickey) (06/21/91)
>markf@zurich.ai.mit.edu (Mark Friedman) writes: >>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. >> ... >> 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 is because the IEEE standard is conservative and does not attempt to specify "environmental" concerns. It would be good if there was a uniform concensus on what a file is and how to specify it (i.e. get HP/Ages, DEC/VMS, */Unix, and IBM/MVS/* to agree in our lifetime). >> 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 I think that you can lighten up a bit here Mark. I have yet to see an implementation of Scheme lacking either EVAL or LOAD, so I think that we can safely say that they are part of Scheme--even if not part of the minimalist IEEE standard. I agree that it would be much better to have the interface (call form) of EVAL and LOAD as a standard--not to mention ERROR! LOAD is certainly in R^3RS (and I suspect R^4RS, but I don't have a copy in front of me 8^). It would be good if in R^5RS there was agreement on what the call forms for EVAL, ERROR, etc. are if they are provided. -Ken Dickey kend@data.uucp PS: As to doing a module system without LOAD, you can always take the maximalist approach: (define joe-module (let () (define (fact n) (if (< n 2) 1 (* n (fact (- n 1))))) (define fromb ..) .. (module fact fromb ...) ) ) (define suzie-module (let () (define (fact n) (let loop ((n n)(a 1)) (if (< n 2) a (loop (- n 1) (* n a)))) ) (define moby-quux ...) ... (module fact moby-quux ...) ) ) ... (define fact (suzie-module 'fact)) (fact (joe-module 'fromb)) ...