Hi!
From: Göran Krampe goran@krampe.se Yes, and let me here note that in my solution ALL references to globals are JUST LIKE TODAY. That means that they are ALWAYS fully qualified in the SOURCE. Sorry for the caps, but this is VERY important to realize.
I think I understand your solution pretty well. Unless I am missing something it is pretty simple: You allow :: in the class name. If it's there it is used. If the Class at the end (e.g. NS::OtherNS::Class) is
No - I don't allow nested spaces. Only one level.
unique on it's own in the system then that is all that shows up in your source. If not, then every place that is ambiguous gets explicitly written out by the compiler. Right?
Yes - but note that the SOURCE always contains the full name. Only the *rendering* of that source in the browser decides whether to show the prefixes or not.
I hooked into a low level spot for that and I think it works in all browsers except the method version browser - need a special fix for that one.
I appreciate all that you have went through to do something about this, and I'm sure you have fought this battle many times.
:)
But here is what I see personally:
- The way it works today seems good enough. I know we are all prefixing
our stuff, but that doesn't seem that bad. Maybe it's because I have only done smaller projects so far so I am not strong on this point, I will take the word of more experienced people (yourself included, but I'm not sure all the votes are in yet).
The funny thing is that people say that "how it works today seems good enough" - in theory that sounds like a vote FOR my solution, not against it. :) IMHO my solution is just an improvement on the current ad hoc pattern.
- Suppose we use your system for the default. At first there are no
classes that use it, and everything is still nice and pretty. Then one day I
If you consider class names like WAComponent and SMAccount nice and pretty - yes.
download some project that uses your namespaces a lot, and it happens to define Array. Now my entire image has "Kernel::Array" everywhere, right?
Well, first of all I mistakenly said in one post that the basic image would use the Kernel:: space. That was wrong (it has been a while since we discussed this before and my memory needed some kickstarting) - I instead advocate basic classes to continue being in the current global space (=no prefix).
And given that - then no, it would still say Array.
And also - even if we did introduce spaces for the basic classes - it is still up to us/you to define the rules for space hiding/viewing.
I don't think addon namespace solutions will ever be used. I wouldn't.
I think you mis-understand me here. I don't see the namespace problem as pressing honestly.
Most of us don't - I wasn't the one bringing it up this time. I just stepped up explaining it since my solution was brought forward on the list.
Also - the solution would enable stuff that we don't know if we are missing or not.
Maybe I don't appreciate the pain this is causing because I generally prefix my classes anyway. But in a *business* you can't wait for the perfect solution. You have a dead-line that must be met. So having a drop in solution, even if it is a quick fix, is a necessity. So no, you wouldn't use an addon for personal things. Neither would I. But for my company? I have and will continue to. There just isn't time not to.
Sure.
Hehe, rush? Are you aware of when I wrote this? Are you aware of how many posts I have written about it? Are you aware of how awfully many times the question of Namespaces have come up on the list? It is one of the "deadly subjects" always causing an explosion of subjective views and always end in nada.
No, I am not aware of all the history here. But none the less, this is a big issue as it changes the way Squeak smalltalk looks.
Of course, just don't say that we (the proponents of my solution) are rushing anything. On the contrary.
In fact - I don't have any high hopes for my code ever entering the base image. I continue to present it and tweak it but as long as we don't have interest from the board (Bert voicing his support though was great and hey, who knows) or from the current release team leader (whoever that will be for 3.10) I don't think it will ever be adopted.
regards, Göran