SystemNavigation and deprecated methods

Andreas Raab andreas.raab at gmx.de
Tue Aug 12 07:32:46 UTC 2003


Hi,

> I agree (and I already asked for feedback on the topic) that 
> SystemNavigation new doSomething is bad.
> Then having a global variable is not good for several reasons: 
> (1) we do not have that good tools to check their definition, 
> state...(don't tell me that we have inspector)

And like I was saying SystemNavigation is stateless ;-) BTW, I'm not sure
what you mean by not having good tools to check the definition of globals.
Have you tried to hit Cmd-B (Alt-B) on a global? I find this to be as good
as for browsing classes.

> I can browse really easily with my stupid browser all the classes
> but global are always a bit magic (2) in a OO model we do not need
> global as we already have classes, so if we could slowly get rid
> of global this would be better. 

Well, there are various points that can be made here (including that classes
are objects so any class is a global object of some kind ;-) but I think my
major argument is that for a well-choosen, limited set of objects it's
perfectly okay to have them accessible by a simple name rather than oddly
long constructs.

> I think that SystemNavigation>>default is quite good. Can you tell us 
> more what you do not like it.

I don't know for sure but I've been using it a couple of times now and the
feeling of it is really, really awkward. It's a psychological thing I guess
and I am certain some people will see this differently. I wrote the message
partly to see if there are any others who feel the same way.

> > Secondly, some of the deprecated methods I think shouldn't be 
> > deprecated at all - most importantly those that refer to finding 
> > references to some symbol in the scope of some class.
> 
> I did not have a deep look but the reason where:

I agree on almost all of the points made and I don't mind moving those
implementations over to SystemNavigation. The thing that bothers me is that
I can no longer ask a class about how it uses certain things - I have to ask
a third party and that just feels so wrong. Like I was saying: Who is
SystemNavigation to know about how B3DHardwareEngine deals with its instance
variables? Having to write code like "SystemNavigation new allCallsOn: #foo
in: Bar" is just ... just non-OO. If I want to know things from Bar I should
ask Bar about it (regardless of where the implementation resides - if Bar
decides to delegate this responsibility to SystemNavigation that's fine
because it's been Bar's decision).

> We have no problem to change however we asked during weeks
> for people to review what we did.

Sure, but a review is different from using things in practice. You can't
tell from a review how bothersome some things may appear to you before you
haven't tried them a couple of times. Every now and then I've been running
into one of those deprecated warnings where I my gut feel was "why the hell
has this been deprecated??? it's perfectly reasonably" and I simply wouldn't
have been able to voice that based on just a review.

Also, you probably need to see the points I have raised in conjunction. For
example, if the class-based queries (which I use all the time) weren't
deprecated, I wouldn't have had the need to write as many times
"SystemNavigation new" so I might be okay with SystemNavigation default for
most purposes.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list