Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!bloom-beacon!REAGAN.AI.MIT.EDU!Alan From: Alan@REAGAN.AI.MIT.EDU (Alan Bawden) Newsgroups: comp.lang.scheme Subject: "unspecified" and SET! Message-ID: <19890619192610.2.ALAN@PIGPEN.AI.MIT.EDU> Date: 19 Jun 89 19:26:00 GMT References: <3902@kalliope.rice.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 21 Date: 18 Jun 89 23:17:50 GMT From: Dorai Sitaram ... Perhaps, SET! is not the ideal side-effecting construct for an expression-oriented language. Felleisen and Friedman [1] propose a side-effecting construct called a SIGMA-capability. This looks just like a LAMBDA-expression, but whereas LAMBDA introduces new bound variables, SIGMA modifies the binding of existing lexical variables. In other words, on applying a SIGMA-capability to arguments, the variables corresponding to the SIGMA-parameters are side-effected. Problems about "unspecified" return values disappear.... I'm having a hard time applying this idea to the NEWLINE procedure -- which is specified in R3RS to return an unspecified value. Is the idea to introduce a side-effecting construct that looks like LAMBDA, but performs a newline when applied to an output port? ((NULINE () ) (CURRENT-OUTPUT-PORT))