Am 29.04.2012 20:08, schrieb Manu:
On 29 April 2012 18:50, Don <[email protected]
[...]
* package. I have no idea how a failed Java experiment got
incorporated into D.
package confuses me, it's poorly documented. What are the protections
between packages, sub-packages. Can parent packages see sub-package
contents? vice-versa?
I've always assume that package is similar to what is available in
another module based languages.
Where you have a library (package) that is composed of several separated
modules.
In certain scenarios, you want to have symbols that are private to the
library, but need to be marked public so that each module, that is part
of the library, is able to see them. So you mark those symbols as
package level access.
This is usually done in "programming in the large" projects.
Some examples where I think this concept might be visible,
- .NET Modules (internal is used for visibility accross .dll)
- default package access for Java common namespaces scattered across
several jar files
- Ada limited and child packages
- Delphi packages
--
Paulo