Library standardization
Bill Baxter
dnewsgroup at billbaxter.com
Tue Apr 22 19:33:33 PDT 2008
Robert Fraser wrote:
> Sean Kelly wrote:
>> Oh, I see what you mean. I suppose one could argue that package
>> methods are
>> effectively static, but it still seems a bit weird to me. Can they
>> access instance
>> variables?
>>
>>
>> Sean
>
> Yes, of course. What's your argument for "effectively static"? "package"
> is just a protection attribute, just like "public", "private", and
> "protected"; I don't see the static-ness involved at all.
>
> Maybe "package" means something different in another language? I'm just
> coming from a Java background where package-protection is the default &
> quite common.
What is a "package" in Java exactly? Does a package correspond to one
source file in Java? Or a directory like D?
I seem to remember some rule of only one main class per .java and the
name of the class must match the name of the file.
--bb
More information about the Digitalmars-d
mailing list