guile-devel
[Top][All Lists]
Advanced

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

Re: Strange memoizing behavior


From: Matthias Koeppe
Subject: Re: Strange memoizing behavior
Date: Thu, 24 Jan 2002 18:33:55 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (sparc-sun-solaris2.7)

Michael Livshin <address@hidden> writes:

> Matthias Koeppe <address@hidden> writes:
>
>> Thien-Thi Nguyen <address@hidden> writes:
>> 
>> >    From: Matthias Koeppe <address@hidden>
>> >    Date: Thu, 17 Jan 2002 15:34:32 +0100
>> >
>> >    Shouldn't Guile report that the (FOO AND) form is bad?
>> >
>> > badness is up to the user to define -- passing macros may actually be
>> > useful sometimes.  to help distinguish, try:
>> >
>> >  (primitive-macro? and) => #t
>> >
>> > note that this relies on being able to pass the macro!
>> 
>> Indeed, we cannot disallow passing macros to functions because that
>> would effectively destroy their first-class status.
>
> yes.  it also would allow Guile not to be stuck in interpreter-land
> forever.  I fail to see how that would be a bad thing.

Care to explain what you mean?  

I was suggesting (in the paragraph that you have cut away) to add
extra error checking to the macro-memoizing evaluator, because passing
macros to a procedure that expects a procedure-argument can cause
wrong, destructive memoizing when the passed argument is used in an
operator position.  (I gave an example where this has bitten me and
suggested that an error should be signalled in certain situations.)

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe



reply via email to

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