DIP22 : Private symbol visibility
Dicebot
m.strashun at gmail.com
Wed Jan 30 01:35:16 PST 2013
On Wednesday, 30 January 2013 at 03:54:53 UTC, deadalnix wrote:
> I have to support that.
>
> static have already quite a lot of different meaning in D, and
> adding yet a new one probably not a good idea. Especially when
> module level declaration are supposed to be static by default,
> so now they can be static static, which is clearly a bad idea.
>
> Is the usage of export have been considered here ? private
> declaration are static/private, unless defined export ? Does
> that work ?
Yes, Timons example has convinced me with no doubts. I never
wanted to use static that much to be honest, just avoid
introduction of new attribute.
Regarding private as internal by default - please look at those
examples:
http://forum.dlang.org/post/irrbdrxordjawkryvrub@forum.dlang.org
If we force internal linkage of private unless marked as export,
it will break code like in case 2 or require some weird mangling
hacks like in C/C++. I do not feel that it is justified, as those
2 concepts are rather different anyway. But it may be an option,
need to evaluate all consequences though.
More information about the Digitalmars-d-announce
mailing list