"data objects" vs "method objects"

Dave Ungar David.Ungar at Eng.Sun.COM
Mon Sep 16 19:50:00 UTC 1991


 I agree, and the original language paper by Randy & me takes this view.
The problem is that this is a hard story to maintain when pushed.
For example, data objects return themselves but methods clone themselves 
when they run. How do you account for the cloning? Or if everything clones,
how does a data-object refer to the clone-father?
Also, the implementation falls a bit short in hiding the differences.

But, this unification is a wonderful platonic ideal that we do strive for.

Dave



> From owner-self at self.stanford.edu Sun Sep 15 20:44:09 1991
> Return-Path: <thinkage!Thinkage.On.CA!scott at watmath.waterloo.edu>
> Date: Sun, 15 Sep 91 23:39:10 EDT
> To: self-interest at self.stanford.edu
> Subject: "data objects" vs "method objects"
> Content-Length: 1071
> X-Lines: 23
> 
> 
> 	Just a thought on how the papers and manuals explain how objects
> are evaluated w.r.t "data objects" vs "method objects".  It seems to
> me that no distinction is necessary or desirable between these two
> "types" of objects.
> 
> 	An object should simply be viewed as something containing a bunch
> of slots, and a method.  An object that is supposed to behave like
> data (i.e., no explicit method) should implicitly be given a method
> which is simply "self".
> 
> 	Describing objects this way would make things seem even more
> uniform -- the manuals would no longer have to state that "Data
> objects are objects without code" or that "A data object returns
> itself when evaluated"; all objects simply execute their method when
> they are evaluated, and return the result.  Since the method for "data
> objects" is "self", everything falls out in the wash.
> 
> 	[Eg: (|x.y|) should be described as an abbreviation for (|x.y| self).]
> 
> --
>     Scott M. King              Thinkage Ltd.         Kitchener, Ontario, Canada
> smking at Thinkage.On.CA       smking at Thinkage.com         uunet!thinkage!smking
> 



More information about the Self-interest mailing list