Yesterday I discovered that a global static variable in D is just a global variable, with no special rule about symbol visibility and such.

I've scrolled quickly through old discussions on the NG and read the relevant DIP: http://wiki.dlang.org/DIP22 It seems to me that nobody thought about reusing the module keyword for declaring symbols with internal linkage. It would look like:

file foo.d:
    module foo; // module declaration
module uint cantSeeMe; // internal linkage attribute, hidden symbol
    private uint can_See_Me; // private, but symbol still visible

AFAIK, module keyword right now is only used for module declaration, and is not valid anywhere else. Would it make sense to use it in this context, too?

Reply via email to