ZetaBase and immutable objects

Henry G. Baker hbaker@netcom.com
Fri, 23 May 1997 19:33:26 -0700 (PDT)


> We already know that in an object-oriented language, a constructor need
> not lock the object it's constructing.  

'We' may know this, but I haven't seen such a thing discussed anywhere
else.  Do you have any references?  The last time I brought this up to
the CLOS crowd, they just gave me blank looks (in effect) back.
Perhaps they hadn't thought about multiple threads.

> One can translate your proposal into
> the rule that a constructor for an immutable object not be able to reference
> `this' (aka `self').  I find this a more elegant formulation.
> -- Scott

I don't understand what rule you are proposing.  'Linear/unique'
objects have only one reference, _period_.  I don't mean that we only
_count_ one; there _is_ only one.  This has very obvious constraints
on the surface syntax of the language, hence my suggestion for
'tagging' variable names that refer to linear objects with '$' (or
some other sort of a tag).  One would then call upon a function such
as 'freeze-linear-into-immutable' to convert a linear object into an
immutable, nonlinear object.

-- 
Henry Baker
www/ftp directory URL:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html