[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lazy evaluation: Goops class/instance customization
From: |
Mikael Djurfeldt |
Subject: |
Re: lazy evaluation: Goops class/instance customization |
Date: |
Wed, 21 May 2003 16:18:01 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Maarten Grachten <address@hidden> writes:
> On Wed, 21 May 2003, Mikael Djurfeldt wrote:
>
>> Why are you using `primitive-eval'?
>>
>> Shouldn't it be simply "(if (promise? v) (force v) v)"?
>
> Well, without the eval the getter gives me back just the variable, and I
> want the value of the variable (if there is one, and an unbound variable
> error otherwise).
Then, in order to get correct semantics, you should remove
`primitive-eval' and instead use the following (untested) version of
make-lazy:
(defmacro make-lazy (specification . body)
(let ((attributes (map (lambda (x)
(if (keyword? x)
x
`(delay ,x)))
body)))
`(make ,specification
,@attributes)))
- lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/19
- Re: lazy evaluation: Goops class/instance customization, Mikael Djurfeldt, 2003/05/20
- Re: lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization, Mikael Djurfeldt, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization,
Mikael Djurfeldt <=
- Re: lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization, David Allouche, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization, Mikael Djurfeldt, 2003/05/21
- Re: lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/22