MOP-standards-discussion
The MOP is great, but nothing is perfect. Here is a place to suggest changes that ought to come:

Open Items

  • The CLOS MOP spec states that the results are undefined if the restrictions on standard-instance-access are not met. This is a probably a case where the authors of the CLOS MOP specification weren't careful enough. Standard-instance-access "is intended to provide highly optimized access", but the wording "the results are undefined" leaves too much room for implementations.
  • slot-readers &co return _names_, not function object, which really sucks if the symbol has been eg. uninterned or fmakunbound, as that leaves you without any defined means to get at the generic function.

    Note that you can

;; from Pascal Costanza
(loop for method in (specializer-direct-methods some-class)
      when (subtypep method 'standard-accessor-method)
      collect (cons (accessor-method-slot-definition method)
                    (method-generic-function method)))

Dropped items

  • set-funcallable-instance-fun, but no funcallable-instance-fun

    specifying a funcallable-instance-function function invalidates a historically used implementation strategy for funcallable instances. (As it turns out, the historical implementation strategy is inherently not threadsafe in a natively-threaded environment, but that's not to say that that implementation strategy is universally bad.) [Christophe Rhodes]

    Note that you can also always call compute-discriminating-function if you need a current version of the discriminating function. In general, it's better to use the function itself rather than its instance-function. [Pascal Costanza]


document