Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!elroy!ucla-cs!pierce From: pierce@lanai.cs.ucla.edu (Brad Pierce) Newsgroups: comp.lang.scheme Subject: Re: Question with binding Summary: Chez Scheme has flexible optimization levels Message-ID: <23115@shemp.CS.UCLA.EDU> Date: 19 Apr 89 02:36:52 GMT References: <26688@polya.Stanford.EDU> <56700003@silver> Sender: news@CS.UCLA.EDU Reply-To: pierce@cs.ucla.edu (Brad Pierce) Distribution: na Organization: UCLA Computer Science Department Lines: 16 In article <56700003@silver> mitchemt@silver.bacs.indiana.edu writes: > >As far as I know, (define + (lambda (x y) (* x y))) will work just fine under >Chez Scheme. I agree that it would be hard to write a compiler for this type >of code. I don't think it will bomb but you might get some weird results. Hope >this is of some help. > Terrence Mitchem, Indiana University. The way Chez Scheme handles this problem is to have 4 different optimization levels, numbered 0-3. At levels 0 and 1, the lower levels, this definition will work just fine. At levels 2 and 3 redefining a primitive such as + will not be allowed. This has worked well for me. Why force one approach or the other on a user when both needs can be accomodated? -- Brad Pierce, UCLA