Re: Uses of :allocation :class?
From: Raymond Toy (toy_at_rtp.ericsson.se)
Date: 06/10/04
- Next message: Peter Seibel: "Re: Uses of :allocation :class?"
- Previous message: Kenny Tilton: "[OT][Long][You All Know Everything Dept] Recommendations for Stat book?"
- In reply to: Peter Seibel: "Uses of :allocation :class?"
- Next in thread: Peter Seibel: "Re: Uses of :allocation :class?"
- Reply: Peter Seibel: "Re: Uses of :allocation :class?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 10 Jun 2004 12:04:42 -0400
>>>>> "Peter" == Peter Seibel <peter@javamonkey.com> writes:
Peter> Anyone have any favorite idioms involving :allocation :class slots. I
I don't have a favorite idiom, but I did use :allocation :class slots
on a particular project. Not sure what I did was really right, but it
seemed to work how I wanted.
I had a base class that had the default slot allocation. Then there
were several subclasses derived from the base class. In these
subclasses, I made the slot :allocation :class because this slot was
the same for all instances of the subclass. I didn't want to use
standard allocation because the value was quite large (2K words or
more), and I expected to have a fair number of instances.
I could have just made the slot value a global constant and had the
slot point to the global constant, I suppose, but that kind of broke
the connection between the object and what data it carried.
Besides it let me play around with something new. :-)
Ray
- Next message: Peter Seibel: "Re: Uses of :allocation :class?"
- Previous message: Kenny Tilton: "[OT][Long][You All Know Everything Dept] Recommendations for Stat book?"
- In reply to: Peter Seibel: "Uses of :allocation :class?"
- Next in thread: Peter Seibel: "Re: Uses of :allocation :class?"
- Reply: Peter Seibel: "Re: Uses of :allocation :class?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|