[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Y, again (long)
In article <8812151447.AA06672@chamartin.ai.mit.edu> email@example.com writes:
<[Lots of stuff about Y]
<;; version 3, "standard" normal order
< ((lambda (f)
< ((lambda (g) (f (g g)))
< (lambda (g) (f (g g)))))
< (lambda (fact)
< (lambda (n)
< (if (= n 0)
< (* n (fact (- n 1))))))))
<Note that version 3 "has no right to work" in Scheme, but I've never
<found anything wrong with compilers that "fix" users' code.
If I understand correctly, then you are saying that this terminates (and
produces a factorial function) with your compiler. This is quite
interesting! Does the compiler eliminate infinite loops all the time?
Or is it just when the loop terminates in normal order, but not in
applicative order? Has anybody complained because the compiler took
their loop out?
What about the semantics: Does Scheme require infinite loops to be generated?