Conversation

how do languages which allow multiple (nested) modules in a single file deal with imports, and relating module names to file paths? e.g. if you have modules A & B with A containing B, is B available (if exported) as A.B? what if src/A/B.blah exists too?
13
12
In Rust, you have two forms. a can contain "mod b;" which declares that there's another file defining the module b, or a can contain "mod b {}" which is an inline definition of the module. The former has a default search path for where it expects the file, but it can be overriden
1
2