[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
interaction of LOAD and CURRENT-INPUT-STREAM
- To: mw%brandeis.csnet @ CSNET-RELAY
- Subject: interaction of LOAD and CURRENT-INPUT-STREAM
- From: Jonathan A Rees <JAR @ MIT-MC>
- Date: 14 March 1985 13:23-EST
- cc: SCHEME @ MIT-MC
Date: 12 Mar 1985 11:22-EST
From: mw%brandeis.csnet at csnet-relay.arpa
1. LOAD does not specify how it interacts with CURRENT-INPUT-STREAM or
CURRENT-OUTPUT-STREAM while loading. What is to be the preferred way
of loading a bootstrap of the following form:
(define! foo ...)
(define! bar (foo (read)))
..complicated data to be processed by foo during load..
It might be argued that this is bad style, but I am not convinced:
such a bootstrap is less dependent on operating system file naming
conventions than one with the data in a separate file.
I don't see any reason for LOAD and CURRENT-INPUT-STREAM to interact,
and I think it is much better for them not to. If they don't interact
you have a much better invariants on each, e.g.: doing LOAD on a file is
the same as doing LOAD on a file consisting of the string "(begin "
appended to the file appended to the string ")".
What's wrong with writing
(define! foo ...)
(define! bar (foo '
..complicated data to be processed by foo during load..
)) ?
This way you don't need to do explicit I/O at all.
... And incidentally, I don't remember the rationale for having both
DEFINE! and DEFINE. I understand why DEFINE shouldn't have hairy
syntax, but what does DEFINE! give you that the stripped-down DEFINE
doesn't?
Jonathan