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

Todd VanderVeen tdv at part.net
Tue Jun 29 12:18:22 PDT 2010


== Quote from Todd VanderVeen (tdv at part.net)'s article
> == Quote from Nick Sabalausky (a at a.a)'s article
> > 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.
> Java supports mobile code. Class loaders can resolve code over the network, not
> against a relative filesystem. The Java package naming convention is based on a
> reversed URL for an organization (e.g. com.myorg.whatever), which is presumably
> unique. It servers as a namespace mechanism.

That should read "not only against relative filesystem". Obviously, it can do this
too.


More information about the Digitalmars-d mailing list