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

Re: LetRec?



    I appreciate that I can declare recursive
    local functions with Labels.  I cannot, however refine recusive/
    circular data structures with it.  There seems to me to be a
    good symetry argument in favour of non-function LetRec to
    match with Labels.  There also seems to be an argument in favour
    of it in that those wanting to progam in a pure functional
    style will not be able to declare circular structures in CL.

How will you implement it?  More interestingly, how will you define its
semantics?  In particular, while this human can tell that there's a solution to
the equation

	x = (cons 1 x)

how is your compiler (or interpreter) going to distinguish that from

	x = (+ 1 x)

or

	x = (foo 1 x)

where ``foo'' is a function that I've written?  I understand very well about the
usual least-fixed-point semantics for LETREC, but those fixed-points are usually
infinite or non-existent; how do you propose that the interpreter discover
representations of such fixed-points in general?

	Pavel