Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!julius.cs.uiuc.edu!apple!snorkelwacker!bloom-beacon!GARLIC.STANFORD.EDU!mkatz From: mkatz@GARLIC.STANFORD.EDU (Morris Katz) Newsgroups: comp.lang.scheme Subject: Side effects in scheme Message-ID: <9009042043.AA03506@garlic.Stanford.EDU> Date: 4 Sep 90 20:43:44 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 27 In article <1543@anaxagoras.ils.nwu.edu> krulwich@ils.nwu.edu (Bruce Krulwich) writes: > (define ... > ... > (let -loop-name- (... vars ...) > ... > (another-proc ... > (lambda (arg) (-loop-name- arg)) ; success continuation > (lambda () (-loop-name- var)) ; failure continuation > ) )) The question about whether or not the above is functional hinges on one issue - how is the let loop implemented (heap space was mentioned in the article). If it is implemented with a let/set! approach (the normal macroexpansion for letrec), then it is NOT functional. I disagree! If a construct has a functional implementation, any implementation for which there is no operation that can demonstrate that it is not functional is effectively functional. (Sorry about all the negations, but I can't seem to find any better phraseology at the moment.) My interpreter might implement + using side effects for some perverse reason, but that does not necessarily make + an imperative operator. ------------------------------------------------------------------------------- Morry Katz katz@cs.stanford.edu -------------------------------------------------------------------------------