guile-devel
[Top][All Lists]
Advanced

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

Re: memoization and conditional defines


From: Bruce Korb
Subject: Re: memoization and conditional defines
Date: Thu, 07 Nov 2002 11:08:24 -0800

Dirk Herrmann wrote:
> 
> Hi folks,
> 
> I would again like to put your focus on the question, whether we should
> support top level forms like the following:
> 
>   (if <condition> (define foo bar))
> 
> In the course of a former conversation on this list there was a consensus
> that such commands should be supported.  However, I have now a better
> understanding why allowing such a thing is problematic,
....
> As an introduction, I would give an example of how memoization works, at
> least in principle.

I don't care how memoization works.  I understand there are
optimization issues.  Optimizing isn't important to me, or
I would not use an interpretive language as my "extension
language".  If you add a disabling mechanism, then you'll
have the best of all worlds.  You can memoize/optimize to
your heart's content, and I'll disable it for my purposes.
If that is not practical and Guile becomes, essentially,
an semi-compiled language with constraints on where
defines may happen, then my goose will be cooked.

BTW, my guess is that memoizing Guile will make it go much slower.
Generally, I just pass Guile a few bytes to process (mostly less
than 40), handle the result and go on.  In fact, the most common
expressions are:  (set! foo (....)) and (. foo).  *Sometimes*, however,
I have some complex stuff that queries the environment to determine
what is going on and from that has to define various different
things.  It's that "sometimes" that hurts.




reply via email to

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