[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Law of good style for CLOS
- To: commonloops.pa@Xerox.COM
- Subject: Law of good style for CLOS
- From: karl lieberherr <lieber@corwin.ccs.northeastern.edu>
- Date: Thu, 26 May 88 15:37:02 EDT
- Cc: rpg@SAIL.STANFORD.EDU
- Redistributed: commonloops.pa
Please can you forward this message to the CLOS community. -Thank you.
We have identified the following law of good style (known in-house
as the Law of Demeter) for CLOS programmers:
----------------------------------------------------------------
All generic function calls inside a method M must have
one of the following objects passed by their first argument:
a value of M's parameters (including self) or
an immediate part of self.
Objects created by the method and non-local objects
are viewed as being transmitted by arguments.
self is the name of the first argument of method M.
----------------------------------------------------------------
A paper on the Law of Demeter and its implications
will be presented at OOPSLA '88. For a short version, see IEEE Computer,
June 88, Open Channel. We use a version of this Law which we can enforce
efficiently at compile-time.
I am interested to know whether CLOS programmers are willing to
constrain themselves to follow this Law. I look forward to your feedback.
-- Karl Lieberherr