module keyword with curly brackets
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 1 07:40:15 PDT 2014
On Saturday, 1 November 2014 at 14:03:51 UTC, Nicolas Sicard
wrote:
> What's the reason why the module keyword was introduced in the
> first place? The package and module hierarchy could have been
> deduced from the directory and file hierarchy, as it is the
> case in Python, IIRC. The search rules just have to be clear. I
> know this has the side effect that module names can't be
> keywords or non-identifiers, but who would use such module
> names?
You can omit module declarations and those will be deduced indeed.
However that will make package path dependent on compiler currend
directory and this is why specifying qualified path explicitly is
helpful.
I see no reason to put module declarations in single level
projects with no packages.
More information about the Digitalmars-d
mailing list