[closer-devel] Re: Initargs of slot definitions: I miss COMPUTE-E-S-D-INITARGS
Ivan Boldyrev
boldyrev+nospam at cgitftp.uiggm.nsc.ru
Sat Nov 25 13:43:04 UTC 2006
On 9668 day of my life Pascal Costanza wrote:
> I think option 2 would be ok in general, and I wouldn't mind much
> whether it adheres to any OOP principles or not.
I do mind, because it clutters code with unnecessary details.
> The more important reason to be more specific here is that calls to
> slot-xyz-using-class can be optimized away when the arguments are
> all of standard metaclasses. So I always try to use as few metaclass
> specialization as possible here.
Currently my slot-definitions keep information about their relations
to other slots. Perhaps, I should move this information from
slot-level to class-level and use standard slot definitions.
> I have seen option 3 being used in example code, even example code
> shown by Kiczales et al. In my opinion, the CLOS MOP specification is
> overly strict here - maybe a copy&paste issue in the spec, I don't
> know. Anyway, that's the reason why I don't use option 3 either.
The other reason is that some implementations (SBCL at least) issues
error message. That's where I know about this restriction from.
>> As I cannot change initargs of effective slot, I also have to set some
>> slots in COMPUTE-EFFECTIVE-SLOT-DEFINITION after calling
>> CALL-NEXT-METHOD.
>
> Exactly.
But this is so inconvenient! There are good-working mechanics of
initargs, and I cannot use it!
>> It is so pity that COMPUTE-EFFECTIVE-SLOT-DEFINITION-INITARGS is not
>> part of the MOP. As I checked, C-E-S-D-I is defined in CMUCL/SBCL,
>> LispWorks, Allegro CL and Clisp (where it is exported symbol). Is it
>> worth making CLOSER-MOP-EXT package where useful extensions like
>> C-E-S-D-I are collected?
>
> Are they documented anywhere?
C-E-S-D-I is documented in Clisp Implementation Notes. Other
implementations have C-E-S-D-I unexported (as part of PCL
implementation).
--
Ivan Boldyrev
Sorry my terrible English, my native language is Lisp!
More information about the closer-devel
mailing list