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

Re: Assigning default slot value plus side effects?

In a recent submission from hall@aplcen.apl.jhu.edu (Marty Hall):
> ...  initialize-instance
>uses slot-value (not the accessors) for putting values in slots.
> ...
>Peter Saurugger responded that he didn't think there was any clean
>approach, and went on to say:
>> While the X3JI3 Specs mention the possibility of adding to the existing
>> initialization-protocol, the behaviour you describe does not seem to be
>> mentioned in this document.
>> I agree very strongly with you that on initialization I would expect the
>> same behaviour as when updating a slot.

It seems like one reason why you would _not_ want the initialization
protocol to invoke the accessor methods is that these methods
frequently depend on the slot being already initialized.  E.g., an
:after method which increments the slot value after each reference.

George Williams
Boeing Computer Services   Internet: george@huntsai.boeing.com  [preferred]
POBox 240002, M/S JA-74        UUCP: ...!uunet!uw-beaver!bcsaic!huntsai!george
Huntsville AL 35824-6402      Phone: 205+461-2597   BTN: 861-2597