digitalmars.D - Module and package question
- Dibyendu Majumdar (8/8) Nov 14 2020 Is my understanding correct that package and module names form
- Adam D. Ruppe (7/11) Nov 14 2020 yeah. even in D the full name includes it
- Dibyendu Majumdar (7/12) Nov 14 2020 Thanks.
Is my understanding correct that package and module names form part of the name mangling? Example: module a.b.c; void hello() {} When compiled the function name will be mangled to include a.b.c? Is it also true that the package and module name need not be associated with directory structure or file name?
Nov 14 2020
On Saturday, 14 November 2020 at 15:05:52 UTC, Dibyendu Majumdar wrote:Is my understanding correct that package and module names form part of the name mangling?yeah. even in D the full name includes it a.b.c.hello(); // will work once a.b.c is imported useful for disambiguating conflicting imports But this full name is what creates the mangle.Is it also true that the package and module name need not be associated with directory structure or file name?right.
Nov 14 2020
On Saturday, 14 November 2020 at 15:29:29 UTC, Adam D. Ruppe wrote:On Saturday, 14 November 2020 at 15:05:52 UTC, Dibyendu Majumdar wrote:Thanks. I noticed that if I place a D source in a directory structure - say a/b/m.mod - and omit the module declaration, then the module name is part of the mangling but not the package. So package names always have to be declared in the module name?Is it also true that the package and module name need not be associated with directory structure or file name?right.
Nov 14 2020