DIP 45 - approval discussion

Benjamin Thaut code at benjamin-thaut.de
Sun Nov 10 03:41:35 PST 2013


Am 08.11.2013 20:32, schrieb Walter Bright:
 > It looks pretty good, except I have serious reservations about the 
-lib switch proposed behavior:
 >
 > 1. It's too blunt. A user could conceivably want to export some 
symbols and not others. This is all or nothing.
 >
 > 2. It requires the compiler to rewrite the .obj files, even ones that 
dmd did not create. I would consider this very surprising behavior. The 
user will be "WTF the object files in the lib are different from on my 
disk! D sux!" -lib is a simple-minded creature that currently does 
exactly what one would expect it to.
 >
 > 3. I've never heard anyone complain about the issue of a DLL 
referencing another DLL and the combined list of exports being the 
concatenation of both. It can be annoying, but it would be a minor 
issue. If it really is one, we can write a separate simple tool that 
strips exports from object files.
 >
 > And:
 >
 > Exporting of TLS variables is a minor issue. Frankly, I think people 
who export global variables should be burned at the stake anyway, why 
should we make it even easier? :-) Anyhow, if the user really, really 
wants to get himself immolated and export a TLS variable, he can always 
manually write the thunk (it is, after all, trivial).
 >
 > (Perhaps we could take this one step further - export doesn't apply 
to global variables, either, unless they are extern(C)?)
 >
 > I do like the idea that this proposal enables better code performance 
on Linux - better than C!


More information about the Digitalmars-d mailing list