chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] making lambdas more introspective


From: Michele Simionato
Subject: Re: [Chicken-users] making lambdas more introspective
Date: Mon, 30 May 2005 02:27:58 -0400

On 5/30/05, felix winkelmann <address@hidden> wrote:
> I wouldn't want to have this for every `lambda': among other things
> the optimizer wouldn't be able to do a god enough job on this
> kind of code (it wouldn't be able to associate the lambda with the
> binding name, and so a lot of opportunities for optimization would
> be lost). So, whille I agree with the usefulness of such a thing, I must
> decline for purely technical reasons... ;-)

Are you saying that extended procedures cannot be optimized in general?

BTW, I was trying to see if I could redefine "lambda" with tricks like
this:

(define-macro (original-lambda formals . body)
  `(lambda ,formals ,@body))

(define-macro (introspective-lambda formals . body)
  `(extend-procedure
    (original-lambda ,formals ,@body) '((formals . ,formals))))

(define-macro lambda introspective-lambda)

But it seems I am entering in an infinite loop somewhat ...

           Michele




reply via email to

[Prev in Thread] Current Thread [Next in Thread]