A little namespace "proposal"
Andreas Raab
andreas.raab at gmx.de
Thu Apr 8 18:08:13 UTC 2004
Lex,
> First, it seems good to quietly grow the lookup context as the user
> works. They should not have to choose which Delay to use every time
> they type it out. Instead, the tools should automatically choose as
> much as possible. The vast majority of users will not be writing code
> that has aliases in it most of the time. The Delay they wanted last
> time is sure to be the Delay they want the next time.
Yes. That's what I actually meant by "imports" and maybe that's just a bad
word. So how about saying that when you load a package, define a new class
the names get "advertised" to the lookup context? They are there for you
ready to use.
> Second, I do not like the idea that only the tools know the lookup
> context. This causes trouble when people share code between each other.
> For example, imagine you install Tweak from SqueakMap and then start
> browsing Tweak code. It will be unreadable if you do not have the right
> lookup context, but if the proper lookup context is only stored in
> Andreas's image, what are the rest of us to do? Do we have to tweak our
> tools before we can read the code we've loaded? What if Andreas loads
> Tweak into a new image -- does he have to spend time setting up the
> lookup context again?
>
> What is so bad about classes having a lookup context? I don't see the
> problem. I am not suggesting that people type a long list of imports
> like in Java, but merely that such a list exist. The tools can fill in
> the lists automatically. It would be just the same as the lookup
> context you guys are discussing would be in the tools, but it would be
> stored in the codebase instead of in the tools. (The tools could still
> have a different lookup context if you want, but that is a secondary
> issue.)
This is a small problem in the overall scheme of things. We can always
delegate back from the tools to the class - let's see where the current
approach leads. As a matter of fact, for the time being I prepare having the
context in the tools - it means we're not starting lots of wild definitions
about "what the lookup means" in our own classes. Consider it a threshold
for the early phases ;-)
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|