SystemNavigation and deprecated methods

Marcus Denker marcus at ira.uka.de
Sat Aug 16 15:16:03 UTC 2003


On Fri, Aug 15, 2003 at 11:30:51PM +0200, Andreas Raab wrote:
> Well, there is a short and a long answer to this. I'll give you the short
> one since I am slightly tired right now. In short, the use of ClassMirror
> _is_ new semantics for a user who has been tought that it is Good Design to
> give responsibility to objects which they carry out themselves. The
> introduction of mirrors in the way described here is a concept which does
> not follow "regular" OO responsibilities. What is more natural than to ask
> an object directly some question? Why would you have to introduce a
> third-person indirect query to some object which apparently has no relation
> to the object you are interested in? From a naive users point of view the
> use of mirrors is VERY non-OOP. If we would presume that this style of use
> were common in OOP then we may, equally well, program only in terms of
> mirrors and I think we all agree that this would be quite against what OOP
> is all about - responsibilities given to objects themselves rather than to
> third parties. So in this sense, the use of mirrors is not at all what I
> would consider a "natural" switch of perspective here.
> 
You could think about the "mirror" as the same Object, but from a different
point of view. To make this analogy perfect, we would need a system were
you can have different views of the same Object: That is, the view shouldn't
change identity, it only changes what you see. The "mirror" would be a
meta-view (all the meta-programming operations are visible). There could
be multiple "user" views, too. e.g. a secure view for non-trusted parties.

So I think the mirror is a pattern to work around the defect of not having
a system with real Perspectives as first-class objects...

  Marcus

-- 
Marcus Denker marcus at ira.uka.de  -- Squeak! http://squeak.de



More information about the Squeak-dev mailing list