Future of export
Nicholas Wilson via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 22 20:19:55 PDT 2017
I have as part of DIP 1012
```
enum SymbolExport
{
neither,
dynamicImport,
dynamicExport
}
alias dynamicImport = SymbolExport .dynamicImport;
alias dynamicExport = SymbolExport .dynamicExport;
```
to replace the `export` storage visibility, So that one can do
```
version(MyLib_Build)
enum MyLibExport = dynamicExport;
else
enum MyLibExport = dynamicImport;
// Exported when building the shared object,
//imported when linking against the shared object.
@MyLibExport void foo(int x) { ... }
```
However Martin said in
https://github.com/dlang/DIPs/pull/89/files#diff-26bf588c0174e6cd0fe3d4af615bebdaR120 that "That's not what is planned for export"
Last I heard (from Benjamins Thaut's DConf 2016 talk) was that
nobody was using export because there was no corresponding import
and no way to switch between them. Benjamin suggested that making
it an attribute would fix that, hence it is part of DIP 1012.
What is planned for export?
More information about the Digitalmars-d
mailing list