Make imports private by default
Bruno Medeiros
brunodomedeirosATgmail at SPAM.com
Thu Apr 13 09:29:27 PDT 2006
Frank Benoit wrote:
> There was a posting of Tyro
> http://www.digitalmars.com/d/archives/digitalmars/D/11081.html
>
> Most ppl seconded that.
>
> The problem is, that D does not work if you use non-private imports all
> the time. Suddenly there are conflicts.
>
> A public import make the imported module part of this modules interface.
> This can (and should) be made public explicitely.
>
Totally agree.
As for the consistency issue, it was said private imports by default
where worth the small inconsistency (of everything else being public).
Actually I disagree with that at the premise level: I don't think it
would be an inconsistency at all. Imports are not members of the module,
as they do not even define a new entity. They are not a "part of" the
module, they are more like a characteristic of it.
Further indication is that there is no "package import". And even
"public import", would it be of any significant use?
(Of course one could think of imports as the definition of a set of
aliases, but really, I would think that's an unadequate and contrived
conceptualization)
--
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list