Stéphane Ducasse wrote:
I thought about it and I would like to have
java package -> extracted as package
smalltalk package -> as package
smalltalk namespace -> as namespace
Is it what you had in mind?
I don't necessarily think that package equals namespace in Java
either. There are the same amount of namespaces as packages, but
unlike packages, the namespaces are not nested, right?
Not really since java packages have more scope than Smalltalk ones.
See what johan is saying.
Euhm... I am saying something very similar to what johan and you say, in
that piece. Johan just transforms this statement into saying that since
this information is "double", lets throw the namespace version away
(since it is not nested, while packages -are-, so packages are the
greater source of information); and move the package version as the
namespace version, since they also affect how classes are scoped.
This is ok on the one hand, however, if we would do analysis based on
this setting, considering namespaces to be scoped and lookup to go from
more detailed to less detailed, this analysis on java applications would
fail because unlike how it would appear, the namespaces aren't actually
scoped.
Well on the other hand, namespaces are obviously
deducable from java
packages, so I guess it makes sense to just have packages and write
code to get the namespace info (which is more or less important
because package belongsTo != namespace belongsTo for java).
You lost me.
This is also what I am saying here. An example:
package A contains package B. This results in having a package B nested
in a package A; but next to that, it results in 2 namespaces
namespace A
and namespace A::B, which are not nested. Thus just replacing the word
package by namespace,... well... is fine by me since it seems logical.
But... handle with care.
What is your opinion about the matter?
@Sandro: get involved , this concerns you too, obviously :)
Yes please. I would like that we arrive to a kind of consensu
My goal is to see if we can avoid duplicating navigation logic such as
a method (in A) refers to a class (B)
so a class (A) refers to another class (B),
so a package(A) refers to package (B)
In the past we duplicated all the logic for package in namespace too.
And this is not cool.
I can only agree on this. Data and logic should be handled as memory and
processor friendly as possible. Until recently I was working on a 1ghz
laptop with 300 meg of RAM. Can you imagine the horror?
Toon