SystemNavigation and deprecated methods

Stephane Ducasse ducasse at iam.unibe.ch
Fri Aug 15 19:05:10 UTC 2003


Two years ago I started to play with the idea and I removed from Object 
instVar and instVarAt:put: and other in plain Squeak. I just called the 
right primitives from the right places.
What is really interesting is that you have at: in Object and at:put: 
this has a big impact in terms
of encapsulation violation.

Stef


On Friday, August 15, 2003, at 07:58 PM, Daniel Vainsencher wrote:

> 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