[Openmcl-devel] clsql regression with slot-value
gb at clozure.com
Tue Mar 10 09:52:34 UTC 2009
The type specified by NIL in CL is the empty type (nothing is of type
NIL.) Saying that a slot has type NIL basically means that "the
results are undefined" if any value is assigned to that slot, since
that value can't possibly be of type NIL. If an implementation tries
to do type-checking on slot initialization and assignment, then it'd
be justified in complaining about any initialization of or assignment
to that NIL-typed slot. (A MYSQL-DATABASE isn't of type NIL; neither
is 17, an APPLE, or anything else.)
I think that 1.2 and earlier may have treated "... :type nil ..."
in a slot specification as if the :type option was missing (and
therefore defaulted to T.) That isn't correct, though it did
mask the fact that saying that a slot has a type of NIL is almost
certainly incorrect (even if it's well-defined.)
Really saying that a slot has type NIL is obscure enough that
I wouldn't be too upset if DEFCLASS warned about it.
I would guess that that the author(s) of CLSQL didn't really
intend to say that the slot in question had type NIL ...
On Tue, 10 Mar 2009, Osei Poku wrote:
> After upgrading to CCL 1.3, I am now getting this error. Inspecting
> the slot definition of VIEW-DATABASE of the STANDARD-DB-OBJECT (the
> direct superclass of FAILDATA-TABLE and the source of that particular
> slot) confirms that the expected type of that slot is infact NIL. Any
> ideas? Prior to upgrading, I never saw anything like this.
> The value #<MYSQL-DATABASE localhost/twdb_lsi_design1_block1/opoku
> OPEN #x300051D6604D>, derived from the initarg :VIEW-DATABASE, can not
> be used to set the value of the slot CLSQL-SYS::VIEW-DATABASE in
> #<FAILDATA-TABLE #x300052859B1D>, because it is not of type NIL.
> [Condition of type CCL::BAD-SLOT-TYPE-FROM-INITARG]
> The CCL version is Version 1.3-RC1-r11804M (LinuxX8664)
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel