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?
Conversation
The trick is to embrace modules != files != compilation units. And ideally get rid of files entirely.
Weirdly, one of the things I think Java did very right was to have the definition of "how do I import this?" be independent of the filesystem location.
4
11
I'm sympathetic to decoupling modules from the file system because I _really_ want cool projectional editing environments in the future that work more like databases, with a the ability to fallback to a text+file system setup for compatibility purposes. 😅


