Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!rice!leto.rice.edu!matthias From: matthias@leto.rice.edu (Matthias Felleisen) Newsgroups: comp.lang.scheme Subject: Re: evaluating () should be an error Message-ID: <1991Mar25.154155.9453@rice.edu> Date: 25 Mar 91 15:41:55 GMT References: <1991Mar24.064144.4256@daffy.cs.wisc.edu> <515sis-d@@massey.ac.nz> Sender: news@rice.edu (News) Organization: Rice University, Houston Lines: 20 In article <515sis-d@@massey.ac.nz> E.Ireland@@massey.ac.nz writes: >The implementation I mentioned in my last message kept to the word of >the language report (3rd version) and returned a special Unspecified >value in these cases. ... I wonder if anyone else has implemented >something similar. Chez Scheme (3.9l) does that, too. A useful alternative is to have the programmer specify what the value of a side-effect expression is. At Rice and Indiana, we have used (sigma (x ...) body), which is like lambda except that upon application it assigns the arguments to the lexical bound variables x ... (in parallel) and then evaluates body returning its value. If the values are already known, we use (set! ((x ex) ...) body), which does the assignments and then evaluates the body. By specifying the value of such forms and functions explicitly, no compatibility problems can arise: they are a part of the program. -- Matthias Felleisen