www.digitalmars.com         C & C++   DMDScript  

D - Looking for clarification: Explicitly named modules

reply Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
When a module has a "module" statement to change its module name, how
should other modules import it?  By file name, or module name?  If by
module name, what kind of search must the compiler perform to find the
appropriate module?

--
The Villagers are Online! villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
Sep 16 2002
next sibling parent reply Burton Radons <loth users.sourceforge.net> writes:
Russ Lewis wrote:
 When a module has a "module" statement to change its module name, how
 should other modules import it?  By file name, or module name?  If by
 module name, what kind of search must the compiler perform to find the
 appropriate module?
File name. It's just to ensure that symbols are mangled using a global name rather than an import or local name; it's not used outside of that capacity.
Sep 16 2002
parent "Walter" <walter digitalmars.com> writes:
"Burton Radons" <loth users.sourceforge.net> wrote in message
news:3D865645.7090505 users.sourceforge.net...
 Russ Lewis wrote:
 When a module has a "module" statement to change its module name, how
 should other modules import it?  By file name, or module name?  If by
 module name, what kind of search must the compiler perform to find the
 appropriate module?
File name. It's just to ensure that symbols are mangled using a global name rather than an import or local name; it's not used outside of that capacity.
It's also looking forward to implementations which would not need to rely on the file system. There'd be more of a 'database' of modules.
Sep 16 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message
news:3D8642FA.E21573C7 deming-os.org...
 When a module has a "module" statement to change its module name, how
 should other modules import it?  By file name, or module name?  If by
 module name, what kind of search must the compiler perform to find the
 appropriate module?
Given the current limitations, it'll need to match the file name.
Sep 16 2002