Problem with coupling shared object symbol visibility with protection

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 17 10:03:07 PST 2015


So i looked at the Dll Test within the dmd test framework and when I 
make export an attribute, like I suggested, this perticular test will 
compile & run without any code changes. This is another reason why I 
suspect that making export an attribute will only break very little if 
any code at all.

Am 16.02.2015 um 09:08 schrieb Walter Bright:
>
> At this point I suggest simply making those private helper functions
> public and export them. It gets your project moving without waiting for
> language changes (and this is a breaking change).
>

I have to big fears with doing this

1) I finish everything up any finally do the pull request. Then the 
reviewers will realize that using export in all required places will 
completely undermine D's module level protection system and reject the 
PR. Then all my work is in vain.

2) Even if 1 does not happen, that means from now on the broken export 
will be used in _actual_ code. Because it kind of works. Going forward 
this would mean that changing export into an attribute will break actual 
production code. So in my opinion we have to implement Dll Support on 
windows and fix export simulatiously, otherwise fixing export will lead 
to big breaking changes instead of a few small ones.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list