Path: utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!ukma!gatech!udel!burdvax!sdcrdcf!ucla-cs!pierce
From: pierce@CS.UCLA.EDU
Newsgroups: comp.lang.scheme
Subject: Re : set in Scheme
Message-ID: <12063@shemp.CS.UCLA.EDU>
Date: 6 May 88 19:27:02 GMT
Sender: news@CS.UCLA.EDU
Reply-To: pierce@CS.UCLA.EDU ()
Distribution: na
Organization: UCLA Computer Science Department
Lines: 21


In reply to David Chin about "set in Scheme".  I'd have to agree with
Pavel that it's better to recode without passing around different symbols.  
However, there's a lot of code out there, UCILISP for natural language
processing for example, which uses "set" all over the place.  If you just
want to get some simple examples from a text or article running, you
may not consider it worth your time to recode everything; fortunately the
problems described by Pavel may not be that critical either for this type of
code.  If so, why not just forget about elegance for a little while and save
yourself some trouble. Just hack out a horrible little ugly macro like the
following:

(macro set
   (lambda (e) `(eval ,`(set! ,(eval (cadr e)) ,(caddr e)))))

But I don't think I'd be "sticking my neck out" by saying that THIS doesn't
adhere to the "Scheme philosophy", so I would use it only in emergencies.

-- Brad Pierce