On packages and naming them

Robert Fraser fraserofthenight at gmail.com
Thu May 22 06:43:08 PDT 2008


terranium wrote:
> Yigal Chripun Wrote:
> 
>> I prefer something in this line more than .all since .all implies the D
>> equivalent of import stuff.*; in Java.
>> the two approaches above can be used when you want to import some sort
>> of Public API (user defined) instead of all the symbols (including the
>> internal ones)
> 
> Who cares whether private symbols are imported or not? What can this affect?

You can't have multiply-defined symbols, even if some of them are 
private. i.e. I have a 3-module program. I want two of the modules to 
work independently but want to use the alias "string" in all 3 modules 
if it hasn't been defined. No way to do this -- the two modules that 
need to be independent would define "string" separately, and the module 
that import them both fails to compile, even when the alias is private 
in one or both of them.



More information about the Digitalmars-d mailing list