CLOStrophobia: its etiology and treatment

  • Authors:
  • Henry G. Baker

  • Affiliations:
  • -

  • Venue:
  • ACM SIGPLAN OOPS Messenger
  • Year:
  • 1991

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Common Lisp Object System (CLOS) has received some praise and some criticism, both deserved. One of the most controversial features of standard CLOS is its linearly-ordered "class precedence list", which is used to linearly order the execution of its "combination" methods. In addition to the problems already known regarding the linear ordering of superclasses, we show that the standard CLOS class precedence ordering produces gratuitously complex and non-intuitive behavior. We then show that a slight modification of the standard ordering rules produces a linear ordering which can achieve most of the goals of CLOS more efficiently, and without impacting most programs. We describe a subset of CLOS called Static CLOS which preserves much of the praise due CLOS, while eliminating some of the criticism. Static CLOS is tuned for delivery of debugged code, rather than for prototype development. This "delivery" CLOS determines as many methods as possible at compile-time using "type inference" techniques. While these techniques generally result in faster-executing code, the space requirements can grow quite large. We argue that this space explosion can be partially ameliorated through the use of our modified class precedence ordering.