[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CLOS programming style

Greetings -

At the Users and Implementor's Workshop in Ottawa last week, I agreed
to pull together a chapter for the upcoming CLOS Report on "CLOS 
Programming Style".  The purpose of this message is to solicit
suggestions and ideas for such an undertaking.

My understanding is that the intended audience for the book covers the
spectrum from new users of CLOS to experienced CLOS programmers and
specialists in object-oriented programming in general.

I want to cover stylistic issues in program design and in presentation
of the design and implementation to the reader.  Appropriate topics
might include 
  - features of CLOS to use or avoid in various situations.
  - issues to consider in designing and documenting a protocol (see
    Lucy Berlin's paper in OOPSLA '90).  I am particularly interested
    in what you tell a user of a protocol (the programmer who needs to
    use its facilities pretty much "as is") and what you tell the
    programmer who needs to extend it.
  - techniques that encourage extensibility and reusability.
  - interesting examples of use of method combination and multimethods
    (one idea that comes to mind is a way of using method combination
    to implement contract checking/enforcement as in eiffel)
  - efficiency traps that might not be obvious to the uninitiated (I
    don't want to dwell on this, but some examples of inefficient and
    more efficient ways to do the same thing might be useful).
  - slots vs. accessors:  when is it appropriate to "advertise" the
    implementation of a class and contemplate use of slot-value, and
    when is it appropriate to "hide" the implementation under a layer
    of accessors.

As David Moon has pointed out, anything anyone says on the topic of
programming style is bound to be at least a little controversial; my
goal is not to achieve consensus, but to pull together some examples
and to get readers to think about some important issues.

Any pointers or examples you can send me will be acknowledged and
appreciated.  Thank you in advance.