DIP22 : Private symbol visibility

Jesse Phillips Jessekphillips+d at gmail.com
Tue Jan 29 21:29:13 PST 2013


On Monday, 28 January 2013 at 17:05:38 UTC, Dicebot wrote:
> http://wiki.dlang.org/DIP22

I think your going to need to give some evidence to the problems 
with the current behavior.

"dlang.org states that "Private module members are equivalent to 
static declarations in C programs." but this is wrong, they have 
external linkage:"

And this results in people writing code that ...? Is there an 
example where you can break code in another module by changing 
something marked as private?

"Name clash between public and private symbols has also been 
stated as unneeded and useless feature"

I'd be for this change, I don't know why it is currently that way 
though.

"There is currently no way in D to mark symbols for internal 
linkage"

What would that give us?

"Compiler errors upon access to private symbol are changed from 
"%s is not accessible" to "undefined identifier %s""

That will just be confusing. You put the name of that symbol 
because you saw it, being told it is undefined is going to make 
you think the compiler is broken.


More information about the Digitalmars-d-announce mailing list