Export ?

Johannes Pfau nospam at example.com
Wed Apr 11 10:03:48 PDT 2012


Am Wed, 11 Apr 2012 11:56:00 +0200
schrieb deadalnix <deadalnix at gmail.com>:
> 
> It isn't a misfeature. The link explain why it is interesting :
>   - It improves load time of DSO.
>   - Allow more optimizations.
>   - Reduce DSO size by 5% to 20% for C++. Considering how long
> mangling are in D, probably more for us.
>   - Reduce name collision (this one poorly apply to D, because the 
> module system handle that quite nicely).
> 
> Additionally, it allow automatic finalization for non exported
> methods in D.
> 

This explains why symbol visibility is useful. But do we really need
'export'? Are there cases where public = export, private/package =
'not exported' wouldn't work? 

When do you actually need 'not-exported' and public? And would export
private/export package be valid?



More information about the Digitalmars-d mailing list