Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 16, 2002 Looking for clarification: Explicitly named modules | ||||
---|---|---|---|---|
| ||||
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))) ] |
September 16, 2002 Re: Looking for clarification: Explicitly named modules | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | 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.
|
September 16, 2002 Re: Looking for clarification: Explicitly named modules | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | "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. |
September 16, 2002 Re: Looking for clarification: Explicitly named modules | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | "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. |
Copyright © 1999-2021 by the D Language Foundation