🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #301

Re: class variables

#301
From: Doug Cutting
Date: Wed, 30 Sep 1992 17:22
18 lines
1429 bytes
In article <HALTRAET.92Sep30032338@monsun.si.no> haltraet@monsun.si.no (Hallvard Tr{tteberg) writes:
>   (2) that you cannot have something in between class and instance
>       slots, e.g. subclass slots, so that different (sub)classes can
>       have different class slot values, while all instances of a
>       subclass have share the same value.
> 
> (I just found out that if a class slot is mentioned in a subclass
> definition, the subclass gets its own class slot, with its own value.
> So (2) above seems to be possible.

Class slots as they stand are really just global variables.  Every
time (... :allocation :class ...) is specified only one slot is ever
created.  It is unfortunate that the standard does not include a
mechanism which causes a new slot to be allocated per subclass.  This
would add new functionality to the language.  As it stands, class
allocation approximates DEFVAR.

	Doug
Technical Details
Message-ID: <CUTTING.92Sep30102223@skye.parc.xerox.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!decwrl!parc!news!cutting
References: <HALTRAET.92Sep30032338@monsun.si.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!decwrl!parc!news!cutting
From: cutting@skye.parc.xerox.com (Doug Cutting)
Newsgroups: comp.lang.clos
Subject: Re: class variables
Message-ID: <CUTTING.92Sep30102223@skye.parc.xerox.com>
Date: 30 Sep 92 17:22:23 GMT
Article-I.D.: skye.CUTTING.92Sep30102223
References: <HALTRAET.92Sep30032338@monsun.si.no>
Sender: news@parc.xerox.com
Organization: Xerox PARC, Palo Alto, CA
Lines: 18
In-Reply-To: haltraet@monsun.si.no's message of Wed, 30 Sep 1992 02:23:38 GMT