[Maxima] CLOS and GCL problems.
smh at franz.com
Wed Dec 19 12:00:21 CST 2007
From: "Richard Fateman" <fateman at cs.berkeley.edu>
To: "'Nicolas Neuss'" <neuss at math.uni-karlsruhe.de>
> (defmethod foo ((x double-float)(n fixnum)) .... )
> is unacceptable.
It works in Allegro CL and CMU-CL and SBCL. I don't know what the standard
It takes less time to find the answer to this question than to type
If you examine your favorite copy of the ANS (either the Hyperspec or
float and double-float etc. you will find that float is defined to
name a class (and therefore also a type) but the several float
subtypes are defined only to be types. Therefore it is not portably
possible to write methods specialized on these, since method
specializers must be classes or eql specializers.
I believe it is allowed for an implementation to define classes for
additional subclasses of subtypes specified in the ANS,
e.g. single-float as a subclass of float, provided the class tree
correctly reflects the subtype relations and gf discrimination on the
portable classes works properly, i.e., passing a single float to foo
will find (defmethod foo ((x float)) ...) as an applicable method.
More information about the Maxima