[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question with binding



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