[Top][All Lists]
[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 03:15:58 -0400 |
On 5/30/05, felix winkelmann <address@hidden> wrote:
>
> Well, more precisely, the compiler can not infer from
>
> (define foo
> (extend-procedure
> (lambda ...)
> ...))
>
> that `foo' is actually bound to the inner lambda. The `extend-procedure'
> may (from the compilers point of view) return anything. And extend-procedure
> may be redefined too...
> On the other hand,
>
> (define foo (lambda ...))
>
> shows the compiler that foo is bound to the lambda and allows
> inlining, etc.
>
Are you saying that a macro
(define-introspectively (foo . args)
...)
would make the compiler happy? In other words, we should
redefine "define", not "lambda"?
That's good, so we could also store the name of the function,
which is even more useful than its arguments for documentation
purposes.
The only thing is, I would like the mechanism to work for
inner defines too.
Michele Simionato