SystemNavigation and deprecated methods

Daniel Vainsencher danielv at netvision.net.il
Fri Aug 15 17:58:40 UTC 2003


Andreas Raab <andreas.raab at gmx.de> wrote:
> Let me try to illustrate this in a practical example: I think we both agree
> that when I write a class-side (utilitiy) method I should not be able to
> access the meta level directly, if only for preventing mistakes, e.g.,
> writing something like "name := something" (this actually happened to me).
> But I don't think that this problem should be addressed by requiring an
> extra indirection if I _do_ want in fact to be meta such as in "(ClassMirror
> on: self) setNameTo: #Mumble" but rather something where I perhaps have an
> explicit annotation for this method that means, yes, I am now in the meta
> level of the system and I (hopefully ;) know what I'm doing.
Actually, this example sounds like a good argument for stratification.
What's a better and more natural "switch" than to do 
myMirror _ ClassMirror on: self.
and from there on use myMirror? it doesn't seem much longer than a
method annotation. The use of ClassMirror is a very clear signal of what
meta aspect(s) you want to access. No new syntax/semantics... again,
this is far from immediately applicable to Squeak, but while we
discussing theoretical examples, I'm not sure why stratification
can't/shouldn't happen in vanilla squeak, exactly through the extra
indirection.

Daniel



More information about the Squeak-dev mailing list