Scope of D packages

Jakob Jenkov via Digitalmars-d-learn digitalmars-d-learn at
Fri Dec 18 15:20:34 PST 2015

I'm coming from Java where "packages" are not that much more than 
directories. Each class can be exposed or hidden inside a package 

In Java it is common that an API consists of many packages and 
subpackages. All classes are simply wrapped up in a JAR (Zip) 
file, and then they can be used as a library.

What is common in D?

Does a library have all its classes inside the same package (same 
directory) ? Or can you have multiple packages / subpackages 
inside the same library *and* same source root?

More information about the Digitalmars-d-learn mailing list