"Klaus D. Witzel" klaus.witzel@cobss.com writes:
import Deeply.Nested.[Package -> Pack] "make Pack be a shortened" "version of Deeply.Nested.Package"
Interesting. Then, when you ask for all references to Package and later to Pack, what are the respective results?
You mean like the alt-N tool?
That's a good question. Thinking about it, it seems to all work out. One interesting case to think about is when you click alt-N when you are looking at the main definition of Deeply.Nested.Package. If you click alt-N there, then surely the tool should also show you references to "Pack" in the above method.
Is this under the assumption that atoms in name space are unassignable objects (like: classes); what happens when Pack := nil ?
It seems to work for any global names. The Java hierarchical-names part just turns the flat namespace into a hierarchy. The Scala-ish renaming and rewriting just provides, within a limited scope, short names that are exactly equivalent to the long names.
(FWIW, I'm sure these tricks are used in other languages, too. I'm just showing where my experience comes from here!)
In general it's just like with what Goran describes where browsers show you short names, but otherwise everything in the system is processing the long names.
-Lex