POS, OOFS, CL v Scheme, etc.
Henry G. Baker
Sun, 11 May 1997 21:39:35 -0700 (PDT)
> Is there a reasonably complete Lisp spec or proposal somewhere
> that would meet many/most of your proposals -- something to use
> as a beginning?
> -- Dwight
As far as 'functional'/'read-only' data types are concerned, my 'Equal
Rights' paper makes some concrete proposals. In particular, if in
CLOS you define a new datatype with all 'readonly' slots, then you
should get a functional data structure. Unfortunately, some other
things in CLOS would need fixing, and especially the Xerox CLOS
implementation which makes it impossible to properly initialize a
One solution to the initialization problem is to incorporate _both_
linear/unique types and functional/readonly types at the same time.
When the storage for an object is first allocated, it is a
linear/unique object, and only when it has been fully initialized does
it get 'frozen' into a functional/readonly object.
The papers I referenced in the earlier posting suggest such an
approach, although it doesn't show how to reprogram CLOS in order to
actually do this.
The most obvious problem is to decide whether 'cons' returns a
functional or a non-functional list object. I would vote for
_functional_, on the grounds that it would trap when you tried to
modify such an object, and would force you to think about how it is to
www/ftp directory URL: