[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 19:58:51 +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:
>
>> 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)))
>>
>
> Ah. Indeed, that seems to work as well. But I don't really see where the
> crucial difference is.
> (not questioning the superiority of this solution :-)
Try the following code and compare the result for the old and the new
make-lazy:
(define c ()
(x #:init-keyword #:x #:accessor x)
#:metaclass <Lazy-Eval-Metaclass>)
(define x 1147)
(define o
(let ((x 4711))
(make-lazy c #:x x))
(x o)
- 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, 2003/05/21
- 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 <=
- Re: lazy evaluation: Goops class/instance customization, Maarten Grachten, 2003/05/22