[pro] Initialization of shared slots

Martin Simmons martin at lispworks.com
Fri Jan 7 19:58:26 UTC 2011


>>>>> On Thu, 06 Jan 2011 11:44:13 -0500, Daniel Weinreb said:
> 
> If you have class c1 with shared slots cs1 and cs2,
> why not just have two global variables (e.f. defvar)
> called *cs1* and *cs2* sitting next to the defclass?
> 
> At least one reason, and maybe the only reason,
> is that the initial value is figured out in a way
> that may depend on class precedence.

Indeed (and also whether subclasses share the same value or have their own).

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/




More information about the pro mailing list