[OT] modules vs filenames in "module-name == filename" package systems

Bruno Medeiros brunodomedeiros+spam at com.gmail
Thu Jul 8 05:45:01 PDT 2010


On 29/06/2010 19:51, Nick Sabalausky wrote:
> In a language that has a package system that forces package names to be the
> same as the directory name, and module names to be the same the file name
> (Such as Java, but not D): What is the point of having packages/modules
> instead of just simply importing by a relative filepath? Is it just so that
> it's consistent with refering to a symbol by it's fully-qualified name, or
> forcibly disallowing absolute paths when importing, or are there other
> reasons?
>
> -------------------------------
> Not sent from an iPhone.
>
>

"forcibly disallowing absolute paths when importing"
Thats one reason.

Also:
* Enforcing imports of D files only, and not files with other 
extensions. As a consequence, no need to specify D file extension.
* Making it clear packages and modules names can only be valid D 
identifiers (ie, no spaces, non alphanumerical symbols, etc.)

Those are reasons enough I hope.

-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list