Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!in1.uu.net!demos!pluscom!usenet
From: moroz@inist.ru (Oleg Moroz)
Subject: Re: silly newbie question about evaluation-contexts.
X-Newsreader: Forte Agent .99c/32.126
Sender: usenet@pluscom.cronyx.ru (Ivan Frolcov)
Nntp-Posting-Host: maddie.inist.ru
Organization: Inist Ltd.
Message-ID: <DL0LHu.x4@pluscom.cronyx.ru>
References: <4d16qa$klt@gutemine.informatik.uni-kiel.de>
Date: Thu, 11 Jan 1996 11:35:40 GMT
Lines: 38

On 10 Jan 1996 20:16:10 GMT, hukriede@xerxes.ifm.uni-kiel.de wrote:

> Hi schemers !
> 
> Could you take a kind look at the following:
> 
>     guile> (define x 999)
>     guile> (define foo '(lambda (a) (list a x)))
>     guile> (let ((x 1000)) ((eval foo) 1))
>     (1 999)
> 
> 
>     elk>   (define x 999)
>     elk>   (define foo '(lambda (a) (list a x)))
>     elk>   (let ((x 1000)) ((eval foo) 1))
>     (1 1000)
> 
> 
> Oops.. what's going on here ?? Might be
> 
>     (1)    guile broken ?
>     (2)    elk broken ?
>     (3)    scheme underspecified ?
> 
> I would vote for 1 and 3, any opinions, comments ?

If you read R4RS or IEEE Scheme standard, you'll see that there's no
'eval' function in Scheme. There was a proposition to add 'eval' to
R5RS but (as I understand) there was no consensus about the
environment in which the evaluation should take place (you might as
well want to pass it to 'eval' as second argument) and the general
usefullness of such a construct.

So, guile and elk introduce 'eval' as an extension to Scheme and do it
in different ways. 

Oleg

