www.digitalmars.com         C & C++   DMDScript  

D - Question about modules

What features do modules have that Java packages don't?

For example, say I have the package hello with the classes HelloWorld,
CommandLine, and InvalidCommandLineArgument. In Java I would put them in the
following structure:

|- hello/
|---- HelloWorld.java
|---- CommandLine.java
|---- InvalidCommandLineArgument.java

With each file having "package hello;" at the top of the file.

With modules it seems each file is in seperate module. Eg. "module
hello.HelloWorld" and then each module in the package must import any other
modules it uses from the same package. In Java classes in the same package
can use other classes without importing. Am I missing something which makes
this feature similiar to that in Java?
Feb 20 2004