Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!news.sprintlink.net!in2.uu.net!newsflash.concordia.ca!news.mcgill.ca!DMI.USherb.CA!clouso.crim.ca!IRO.UMontreal.CA!news.iro.umontreal.ca!feeley
From: feeley@raptor.IRO.UMontreal.CA (Marc Feeley)
Subject: Re: R4RS noncompliance on loading files
In-Reply-To: richter@banach.math.purdue.edu's message of 31 Aug 1995 09:31:43 GMT
Message-ID: <FEELEY.95Sep1144605@raptor.IRO.UMontreal.CA>
Sender: news@IRO.UMontreal.CA
Organization: Universite de Montreal
References: <423vhv$4al@mozo.cc.purdue.edu>
Date: Fri, 1 Sep 1995 18:46:05 GMT
Lines: 30

> From the "System Interface" node of the R4RS manual:
> 
>  -- essential procedure: load FILENAME
>      FILENAME should be a string naming an existing file containing
>      Scheme source code. The `load' procedure reads expressions and
>      definitions from the file and evaluates them sequentially.  It is
>      unspecified whether the results of the expressions are printed. 
>      The `load' procedure does not affect the values returned by
>      `current-input-port' and `current-output-port'. `Load' returns an
>      unspecified value.
> 
> 
> I think the only reasonable reading of this is that load will evaluate
> the expressions in the current environment.  But I don't know of a
> Scheme interpreter that does this.  

I think your interpretation is wrong, because "load" operates at run
time, not at compile time.  For the record, Gambit has a special form
called "include" that operates at compile time and that does what you
want.  The expression (include "filename") will splice all the
expressions in the named file in the place of the include.

So in Gambit, your example would work if you write:

(define (make-account balance)
  (include "joker")
  dispatch)


Marc
