features.txt 18.2 KB
Newer Older
Pascal Costanza's avatar
Pascal Costanza committed
1
2
Features that don't adhere to AMOP in various CLOS MOP implementations, and whether and how they are resolved in Closer to MOP.

3
Allegro Common Lisp 7.0
Pascal Costanza's avatar
Pascal Costanza committed
4

5
- CLASS-DIRECT-DEFAULT-INITARGS and CLASS-DEFAULT-INITARGS doesn't return canonicalized default initargs as specified. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
6
7
8
9
10
- COMPUTE-DEFAULT-INITARGS takes more parameters than specified. Not fixed. Conditionalize on #+allegro for your own methods instead.
- DEFGENERIC does not call FIND-METHOD-COMBINATION. Not fixed.
- DEFMETHOD doesn't call MAKE-METHOD-LAMBDA. Not fixed.
- The dependent protocol for generic functions doesn't work fully. Fixed.
- The function invocation protocol doesn't call COMPUTE-APPLICABLE-METHODS, COMPUTE-APPLICABLE-METHODS-USING-CLASSES and COMPUTE-EFFECTIVE-METHOD. Not fixed.
11
- The :ALLOCATION type cannot be extended. Fixed.
Pascal Costanza's avatar
Pascal Costanza committed
12
13
- MAKE-METHOD-LAMBDA is not provided. Not fixed.
- Method functions don't take parameters as specified in AMOP, but instead just the parameters that the generic function receives. Not fixed.
14
- The defmethod form does not accept multiple qualifiers. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
15
16
- REINITIALIZE-INSTANCE doesn't determine a new discriminating function. Fixed.
- (SETF CLASS-NAME) and (SETF GENERIC-FUNCTION-NAME) do not use REINITIALIZE-INSTANCE for changing the names. Not fixed.
17
18
19
- SLOT-BOUNDP-USING-CLASS and SLOT-MAKUNBOUND-USING-CLASS are not specialized on slot definition metaobjects, but on symbols. Fixed.
- STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible. Not fixed.
- VALIDATE-SUPERCLASS doesn't recognize T as a valid superclass. Not fixed.
20
- Subclasses of BUILT-IN-CLASS, FORWARD-REFERENCED-CLASS, FUNCALLABLE-STANDARD-CLASS, METHOD-COMBINATION, STANDARD-ACCESSOR-METHOD, STANDARD-CLASS, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
21

22
Allegro Common Lisp 8.0
23

24
- CLASS-DIRECT-DEFAULT-INITARGS and CLASS-DEFAULT-INITARGS doesn't return canonicalized default initargs as specified. Not fixed.
25
26
27
28
29
- COMPUTE-DEFAULT-INITARGS takes more parameters than specified. Not fixed. Conditionalize on #+allegro for your own methods instead.
- DEFGENERIC does not call FIND-METHOD-COMBINATION. Not fixed.
- DEFMETHOD doesn't call MAKE-METHOD-LAMBDA. Not fixed.
- The dependent protocol for generic functions doesn't work fully. Fixed.
- The function invocation protocol doesn't call COMPUTE-APPLICABLE-METHODS, COMPUTE-APPLICABLE-METHODS-USING-CLASSES and COMPUTE-EFFECTIVE-METHOD. Not fixed.
30
- The :ALLOCATION type cannot be extended. Fixed.
31
32
33
34
35
- MAKE-METHOD-LAMBDA is not provided. Not fixed.
- Method functions don't take parameters as specified in AMOP, but instead just the parameters that the generic function receives. Not fixed.
- REINITIALIZE-INSTANCE doesn't determine a new discriminating function. Fixed.
- (SETF CLASS-NAME) and (SETF GENERIC-FUNCTION-NAME) do not use REINITIALIZE-INSTANCE for changing the names. Not fixed.
- SLOT-BOUNDP-USING-CLASS and SLOT-MAKUNBOUND-USING-CLASS are not specialized on slot definition metaobjects, but on symbols. Fixed.
Pascal Costanza's avatar
Pascal Costanza committed
36
37
- STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible. Not fixed.
- VALIDATE-SUPERCLASS doesn't recognize T as a valid superclass. Not fixed.
38
- Subclasses of BUILT-IN-CLASS, FORWARD-REFERENCED-CLASS, FUNCALLABLE-STANDARD-CLASS, METHOD-COMBINATION, STANDARD-ACCESSOR-METHOD, STANDARD-CLASS, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
39

Pascal Costanza's avatar
Pascal Costanza committed
40
CLisp 2.35 and 2.36
Pascal Costanza's avatar
Pascal Costanza committed
41
42
43
44
45

None of the incompatibilities in CLisp are fixed.

- Methods are not initialized with :function.
- ADD-METHOD, REMOVE-METHOD, INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE do not determine a new discriminating function. This is postponed until function invocation instead, so shouldn't be a problem in practice.
46
- The slot order requested by a primary method for COMPUTE-SLOTS is not honoured by this MOP.
Pascal Costanza's avatar
Pascal Costanza committed
47
- DEFMETHOD does not call MAKE-METHOD-LAMBDA.
48
- The :ALLOCATION type cannot be extended. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
49
50
- A FORWARD-REFERENCED-CLASS is not changed via CHANGE-CLASS (but is correctly reinitialized via REINITIALIZE-INSTANCE).
- MAKE-METHOD-LAMBDA is not provided.
51
- REINITIALIZE-INSTANCE of a class metaobject doesn't invoke FINALIZE-INHERITANCE again. Not fixed.
52
- Subclasses of METHOD-COMBINATION will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
53

54
CLisp 2.37 - 2.39
Pascal Costanza's avatar
Pascal Costanza committed
55
56
57
58
59
60
61
62
63

None of the incompatibilities in CLisp are fixed.

- Methods are not initialized with :function.
- ADD-METHOD, REMOVE-METHOD, INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE do not determine a new discriminating function. This is postponed until function invocation instead, so shouldn't be a problem in practice.
- The slot order requested by a primary method for COMPUTE-SLOTS is not honoured by this MOP.
- DEFMETHOD does not call MAKE-METHOD-LAMBDA.
- A FORWARD-REFERENCED-CLASS is not changed via CHANGE-CLASS (but is correctly reinitialized via REINITIALIZE-INSTANCE).
- MAKE-METHOD-LAMBDA is not provided.
64
- REINITIALIZE-INSTANCE of a class metaobject doesn't invoke FINALIZE-INHERITANCE again. Not fixed.
65
- Subclasses of METHOD-COMBINATION will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
66

67
CLisp 2.40 and 2.41
68
69
70
71
72
73
74
75
76
77
78

None of the incompatibilities in CLisp are fixed.

- Methods are not initialized with :function.
- ADD-METHOD, REMOVE-METHOD, INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE do not determine a new discriminating function. This is postponed until function invocation instead, so shouldn't be a problem in practice.
- The slot order requested by a primary method for COMPUTE-SLOTS is not honoured by this MOP.
- DEFMETHOD does not call MAKE-METHOD-LAMBDA.
- A FORWARD-REFERENCED-CLASS is not changed via CHANGE-CLASS (but is correctly reinitialized via REINITIALIZE-INSTANCE).
- MAKE-METHOD-LAMBDA is not provided.
- Subclasses of METHOD-COMBINATION will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.

79
CMUCL 19c
Pascal Costanza's avatar
Pascal Costanza committed
80

81
- CLASS-DIRECT-DEFAULT-INITARGS and CLASS-DEFAULT-INITARGS doesn't return canonicalized default initargs as specified. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
82
83
84
- Accessor methods are not initialized with :function, :lambda-list, :slot-definition and :specializers. Fixed.
- Classes cannot be anonymous. Fixed.
- Class initialization doesn't call READER-METHOD-CLASS and WRITER-METHOD-CLASS for accessor methods. Fixed.
85
- The object returned by compute-discriminating-function cannot be a closure. Likewise, the second parameter to set-funcallable-instance-function cannot be a closure, but only a "pure" function/thunk. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
86
- Effective slot definitions are not initialized with :documentation, and EFFECTIVE-SLOT-DEFINITION-CLASS also doesn't receive that initarg. Not fixed.
87
- Calling DOCUMENTATION on effective slot definition metaobjects don't return their documentation as specified in ANSI Common Lisp. Fixed.
Pascal Costanza's avatar
Pascal Costanza committed
88
89
90
- Methods are not initialized with :function. Not fixed.
- Multiple slot options are not passed as lists to DIRECT-SLOT-DEFINITION-CLASS. Not fixed, but use FIX-SLOT-INITARGS as a workaround.
- REINITIALIZE-INSTANCE doesn't determine a new discriminating function. Fixed.
91
- REINITIALIZE-INSTANCE of a class metaobject doesn't invoke FINALIZE-INHERITANCE again. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
92
93
- (SETF CLASS-NAME) and (SETF GENERIC-FUNCTION-NAME) do not use REINITIALIZE-INSTANCE for changing the names. Fixed.
- STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible. Not fixed.
94
- Subclasses of BUILT-IN-CLASS, CLASS, DIRECT-SLOT-DEFINITION, EFFECTIVE-SLOT-DEFINITION, EQL-SPECIALIZER, FORWARD-REFERENCED-CLASS, FUNCALLABLE-STANDARD-CLASS, SLOT-DEFINITION, SPECIALIZER, STANDARD-ACCESSOR-METHOD, STANDARD-CLASS, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
95

96
LispWorks, 4.4.5, 4.4.6, Personal and Professional Editions
Pascal Costanza's avatar
Pascal Costanza committed
97

98
- CLASS-DIRECT-DEFAULT-INITARGS and CLASS-DEFAULT-INITARGS doesn't return canonicalized default initargs as specified. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
99
100
101
102
103
104
105
106
107
108
- ADD-METHOD doesn't call ADD-DIRECT-METHOD and REMOVE-METHOD. Fixed.
- ADD-METHOD, REMOVE-METHOD, INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE do not determine a new discriminating function. This is postponed until function invocation instead, so shouldn't be a problem in practice.
- Effective slot definitions are not initialized with :allocation, and EFFECTIVE-SLOT-DEFINITION-CLASS also doesn't receive that initarg. Not fixed. This information is encoded in the initarg :flags, but I don't have any detailed information about that parameter.
- Classes are not initialized with :direct-default-initargs, but with :default-initargs. Conditionalize on #+lispworks to fix this.
- Class reinitialization does not call REMOVE-DIRECT-SUBCLASS. Fixed.
- COMPUTE-APPLICABLE-METHODS-USING-CLASSES doesn't exist. Not fixed.
- COMPUTE-DEFAULT-INITARGS doesn't exist. Not fixed.
- DEFGENERIC does not call FIND-METHOD-COMBINATION. Not fixed.
- When classes are initialized, :direct-superclasses are by default not empty. Not fixed, but direct superclasses are automatically adjusted when you use the standard idiom for adding a new default superclass.
- EQL-SPECIALIZER, EQL-SPECIALIZER-OBJECT and INTERN-EQL-SPECIALIZER don't exist. In LispWorks, eql specializers are lists not objects. I have provided EQL-SPECIALIZER as a type (not as a class) and EQL-SPECIALIZER-OBJECT and INTERN-EQL-SPECIALIZER to work on lists, and a class EQL-SPECIALIZER* and corresponding EQL-SPECIALIZER-OBJECT* and INTERN-EQL-SPECILAIZER* to soften the incompatibilities.
109
- The :ALLOCATION type cannot be extended. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
110
111
112
113
114
115
116
117
118
119
120
121
122
- FIND-METHOD-COMBINATION doesn't exist. Fixed, but fixed version doesn't work with method combination options.
- FUNCALLABLE-STANDARD-INSTANCE-ACCESS and STANDARD-INSTANCE-ACCESS don't exist. Not fixed.
- The function invocation protocol doesn't call COMPUTE-APPLICABLE-METHODS and COMPUTE-APPLICABLE-METHODS-USING-CLASSES. Not fixed.
- Generic functions are not initialized with :declarations, but with 'declare. Not fixed. Conditionalize on #+lispworks instead.
- MAKE-METHOD-LAMBDA expects other parameters than specified. Fixed.
- Method functions don't take parameters as specified in AMOP, but instead just the parameters that the generic function receives. Not fixed.
- REMOVE-METHOD doesn't call REMOVE-DIRECT-METHOD. Fixed.
- (SETF CLASS-NAME) and (SETF GENERIC-FUNCTION-NAME) do not use REINITIALIZE-INSTANCE for changing the names. Not fixed.
- The slot methods (SLOT-VALUE-USING-CLASS, etc.) are not specialized on effective slot definitions, but on slot names. Fixed.
- The generated accessor methods don't use the slot methods for accessing slots. Fixed. (Don't use :optimize-slot-access to deoptimize slot access, or otherwise the fixed slot access protocol doesn't work anymore!)
- SPECIALIZER doesn't exist. Not fixed.
- SPECIALIZER-DIRECT-GENERIC-FUNCTIONS doesn't exist. Fixed.
- STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible. Not fixed.
123
124
- Subclasses of BUILT-IN-CLASS, CLASS, DIRECT-SLOT-DEFINITION, EFFECTIVE-SLOT-DEFINITION, FORWARD-REFERENCED-CLASS, FUNCALLABLE-STANDARD-CLASS, SLOT-DEFINITION, STANDARD-ACCESSOR-METHOD, STANDARD-CLASS, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.

Pascal Costanza's avatar
Pascal Costanza committed
125
126
127
128
129

MCL 5.1

In MCL, generic functions work completely differently than specified. The specific incompatibilities are not listed and are not fixed.

130
- The object returned by compute-discriminating-function cannot be a closure. Likewise, the second parameter to set-funcallable-instance-function cannot be a closure, but only a "pure" function/thunk. Not fixed.
131
- GENERIC-FUNCTION-DECLARATIONS doesn't return the specified declarations for a generic function. Not fixed.
132
- The slot order requested by a primary method for COMPUTE-SLOTS is not honoured by this MOP. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
133
134
- DIRECT-SLOT-DEFINITION, EFFECTIVE-SLOT-DEFINITION, EQL-SPECIALIZER, SLOT-DEFINITION and STANDARD-SLOT-DEFINITION are not exported. Fixed.
- When classes are initialized, :direct-superclasses are by default not empty. Not fixed, but direct superclasses are automatically adjusted when you use the standard idiom for adding a new default superclass.
135
- The :ALLOCATION type cannot be extended. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
136
137
- Multiple slot options are not passed as lists to DIRECT-SLOT-DEFINITION-CLASS. Not fixed, but use FIX-SLOT-INITARGS as a workaround.
- (SETF CLASS-NAME) doesn't use REINITIALIZE-INSTANCE for changing the names. Fixed.
138
- REINITIALIZE-INSTANCE of a class metaobject doesn't invoke FINALIZE-INHERITANCE again. Not fixed.
139
- Subclasses of DIRECT-SLOT-DEFINITION, EFFECTIVE-SLOT-DEFINITION, SLOT-DEFINITION, STANDARD-ACCESSOR-METHOD, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
140

141
OpenMCL 1.0
Pascal Costanza's avatar
Pascal Costanza committed
142
143
144

In OpenMCL, generic functions work completely differently than specified. The specific incompatibilities are not listed and are not fixed.

145
- The slot order requested by a primary method for COMPUTE-SLOTS is not honoured by this MOP. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
146
- EQL-SPECIALIZER is not exported. Fixed.
147
- DOCUMENTATION doesn't return the documentation strings for slot definition metaobjects. Fixed.
148
- REINITIALIZE-INSTANCE of a class metaobject doesn't invoke FINALIZE-INHERITANCE again. Not fixed.
149
- Subclasses of DIRECT-SLOT-DEFINITION, EFFECTIVE-SLOT-DEFINITION, GENERIC-FUNCTION, SLOT-DEFINITION, STANDARD-ACCESSOR-METHOD, STANDARD-DIRECT-SLOT-DEFINITION, STANDARD-EFFECTIVE-SLOT-DEFINITION, STANDARD-GENERIC-FUNCTION, STANDARD-METHOD, STANDARD-READER-METHOD, STANDARD-SLOT-DEFINITION and STANDARD-WRITER-METHOD will inherit slots whose names are exported symbols and/or accessible in the package common-lisp-user. Not fixed.
Pascal Costanza's avatar
Pascal Costanza committed
150

151
SBCL 0.9.16,0.9.17
Pascal Costanza's avatar
Pascal Costanza committed
152

153
All features implemented.
154
155


Pascal Costanza's avatar
Pascal Costanza committed
156
157
Summary:

158
- CLASS-DIRECT-DEFAULT-INITARGS and CLASS-DEFAULT-INITARGS exist, but don't work as expected in Allegro Common Lisp, CMUCL and LispWorks.
Pascal Costanza's avatar
Pascal Costanza committed
159
- If you specialize COMPUTE-DEFAULT-INITAGS, conditionalize for the extra parameters in Allegro Common Lisp.
160
161
- In CMUCL, MCL and OpenMCL, the object returned by compute-discriminating-function cannot be a closure. Likewise, the second parameter to set-funcallable-instance-function cannot be a closure, but only a "pure" function/thunk.
- In CLisp, MCL and OpenMCL, the slot order requested by a primary method for COMPUTE-SLOTS is not honoured by the respective MOPs.
Pascal Costanza's avatar
Pascal Costanza committed
162
163
164
165
166
- Don't rely on FIND-METHOD-COMBINATION to do its job correctly, only when you don't provide method combination options.
- MAKE-METHOD-LAMBDA only works in CMUCL and SBCL as specified (but make sure that the respective generic function and method metaobject classes and make-method-lambda definitions are part of your compilation enviroment). MAKE-METHOD-LAMBDA also works in LispWorks, but the returned lambda expressions don't adhere to the AMOP specification (which may be good enough for your purposes).
- Specialize the methods for the dependent protocol on the class or generic function metaobject class. The example in AMOP doesn't do this but that is fragile code.
- Don't rely on methods being initialized with the specified initargs from inside the MOP.
- CLisp doesn't change a FORWARD-REFERENCED-CLASS via CHANGE-CLASS. Apart from that, FORWARD-REFERENCED-CLASS works reliably across all MOPs.
167
- Effective slot definitions and EFFECTIVE-SLOT-DEFINITION-CLASS don't receive :documentation in CMUCL, and no :allocation (!) in LispWorks.
Pascal Costanza's avatar
Pascal Costanza committed
168
- If you specialize DIRECT-SLOT-DEFINITION-CLASS, use FIX-SLOT-INITARGS in portable code.
169
- If you want to use :ALLOCATION types other than :CLASS or :INSTANCE, you cannot use CLisp before 2.37, LispWorks or MCL. Only Allegro Common Lisp, CLisp from 2.37 on, CMUCL, OpenMCL and SBCL support this.
170
- In Allegro, CMUCL and LispWorks, STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS are not compatible.
Pascal Costanza's avatar
Pascal Costanza committed
171
172
173
174
175
- The function invocation protocol only works in CMUCL, SBCL and CLisp.
- If you need to see :direct-default-initargs when classes are initialized, conditionalize on #+lispworks to receive :default-initargs instead.
- COMPUTE-DEFAULT-INITARGS doesn't exist (and isn't called) in LispWorks.
- In LispWorks, eql specializers are lists.
- FUNCALLABLE-STANDARD-INSTANCE-ACCESS and STANDARD-INSTANCE-ACCESS doesn't exist / should not be used in LispWorks.
176
- In CLisp before version 2.40, and in CMUCL, MCL and OpenMCL, the reinitialization of a class metaobject does not lead to a call of FINALIZE-INHERITANCE, so methods defined on FINALIZE-INHERITANCE won't be called again in that case.
Pascal Costanza's avatar
Pascal Costanza committed
177
178
179
180
- If you need to see :declarations when generic functions are initialized, conditionalize on #+lispworks to receive 'declare instead. (Actually, AMOP and ANSI Common Lisp diverge in this regard. AMOP specifies that :declarations is used whereas ANSI Common Lisp specifies that 'declare is used. Since most MOP implementations adhere to AMOP in this regard, I have also chosen that path.)
- In Allegro Common Lisp and LispWorks, method functions take the original parameters that a generic function has received.
- In LispWorks, the class SPECIALIZER doesn't exist.
- If you need to rely on the generic function protocols, don't use MCL or OpenMCL (or be very careful - some minor things work there as specified).
181
- The declarations for a generic function cannot be inspected in MCL.
182
- All implementations define slots on various specified metaobject classes that are exported from some package and/or accessible in the package common-lisp-user. Only sbcl is safe from this, and clisp is relatively safe in that it does that only for the class METHOD-COMBINATION.