Andrei Polushin <[EMAIL PROTECTED]> writes:

>Henning P. Schmiedehausen writes:
>> One of the quirks in the Java language is, that the package names
>> (foo, foo.bar, foo.bar.baz) imply a hierarchy which in fact does not
>> exist. There is no "visible in package and sub-packages" modifier. So
>> if you want to use an utility class in foo, foo.bar, foo.baz, you have
>> to make it public (Sun, are you listening? Here is a chance for
>> another cool new scope that C# probably doesn't have yet. ;-) )

Thanks for the pointer. I wasn't aware of that. However, my C#
experience doesn't stretch much beyond "hello, world". :-)

>It's off-topic, but C# does provide the desired meaning with its 
>'internal' access modifier keyword, and there is no 'package private' 
>classes there, see 
>http://msdn.microsoft.com/library/en-us/csref/html/vclrfInternalPG.asp

That shows that C# derives from C. :-) This is the same thing as a
global "static" in a C program. The symbol is not visible through the
linker/whatever it is called for Assemblies these days.

>The possible Java pattern is to provide 'private' package(s), and 
>prohibit their usage, like Sun did with sun.* packages: 
>http://java.sun.com/products/jdk/faq/faq-sun-packages.html

But that is a usage pattern, not a compiler enforced restriction. That
is what we do all the time by putting "don't use this class in your
programs" comments in the classes.

        Best regards
                Henning



-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

                      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to