guile-user
[Top][All Lists]
Advanced

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

Re: Simplified slot access in goops


From: Clinton Ebadi
Subject: Re: Simplified slot access in goops
Date: Tue, 02 Dec 2008 04:32:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Neil Jerram" <address@hidden> writes:

> 2008/11/27 Maciek Godek <address@hidden>:
>
>> Perhaps the possible inconvenience is that all variable
>> names that happen to be the slot names of a given class
>> are shadowed. In the long run it may also cause significant
>> performance problems (or that's what I think), especially
>> when dealing with objects with a hell lotta slots.
>>
>> I wonder if it would be possible to make it optimizable
>> for the JIT compiler somehow (and to make the "in" syntax
>> official part of GOOPS)
>
> I think this is a nice interface; but I'm less sure about the
> implementation.  Why do you need to use primitive-eval at all?
>
> Isn't CL's with-slots a bit like this?  It might help to look at how
> that is implemented.

with-slots uses symbol-macrolet[0] to bind each of the variable names to
symbol macros within its body. I don't know of anything in Guile that is
equivalent.


[0] http://franz.com/support/documentation/6.0/ansicl/dictentr/symbol-m.htm
-- 
                         Ruled by the ebb of my oceans                         
                        Slaves to the dusk and the dawn                        
                         Your petri dish civilisations                        
                             Are buried and born                              




reply via email to

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