Package Declaration

Jonathan M Davis jmdavisProg at gmx.com
Wed Jun 6 08:30:20 PDT 2012


On Wednesday, June 06, 2012 12:40:20 Namespace wrote:
> And why haven't D any package System, e.g. like in Java were it
> is legal to access methods or classes which are in the same
> package?

It _does_ have a package system. The package access level works within a 
package - i.e. within a folder. So for instance, everything in std.net which 
has package access can be accessed by any of the other modules in std.net but 
not by any other modules.

> The current module system is very nice, but it have limits.

Every module system does. There are pros and cons to any set of design 
decisions. D's module system may not be perfect, but it works very well 
overall.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list