How to break module into multiple file.

Matthew Ong ongbp at yahoo.com
Thu May 12 06:33:29 PDT 2011


Hi,

According to:
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=135947

And also source code within dmd2/src
It seems that there is only one file per module.

Is module similar to a single java package and namespace in VC++/C#?

If yes, most name spaced programming language allow breaking of single module
into multiple
file to store various logically linked class and separate them when they are not.

Like module Collection may have:
Common interfaces for both HashMap, LinkedList and hashlist.

But they should be all be in different source file(HashMap.d, LinkedList.d,
HashList.d) but
logically within the same module collection.(Directory)
How do I do that within D? what is the directory layout of the project?

Matthew Ong


More information about the Digitalmars-d-learn mailing list