What exactly module in D means?

Olivier Pisano via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 5 10:08:00 PDT 2014


No, import is different from include. It does not stupidly copy
and paste its content but tells the compiler to take the module
into account for name resolution. The result may seem similar,
but is much more efficient.

A D module is also a unit of encapsulation (a private declaration
in a module is only accessible from this module, and not from
another one importing it).


More information about the Digitalmars-d-learn mailing list