Feature request: "noexport" keyword

Bekenn leaveme at alone.com
Sun Feb 20 09:34:59 PST 2011


On 2/19/2011 11:30 PM, Nick Sabalausky wrote:
> "Bekenn"<leaveme at alone.com>  wrote in message
> news:ijqffm$6lk$1 at digitalmars.com...
> I'm not 100% certain, but I think this should already do what you want:
>
> export extern (Windows):
> void func1();
> int func2();
>
> public:
> void func3();
> void func4();
>
>
>


Hmm... I think you may be right.  I hadn't considered that, but it makes 
sense.  I was thinking that the "export" attribute was independent of 
the other protection attributes, which would introduce an asymmetry: 
private, package, and public could each be overridden by supplying a 
different protection attribute, but export couldn't be overridden. 
However, thinking about it, a "private export" wouldn't make much sense 
(and "export" is listed as a protection attribute, right along with the 
others), so I guess they must all be mutually exclusive.

I just tested this by trying to compile a module with the following line:

	public export void func();

The compiler rejects it with the message "redundant protection 
attribute."  I think that pretty clearly settles this issue.


More information about the Digitalmars-d mailing list