DIP 45 - approval discussion

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


Am 10.11.2013 13:39, schrieb Timon Gehr:
> On 11/10/2013 01:06 PM, Benjamin Thaut wrote:
>> Am 10.11.2013 13:03, schrieb Timon Gehr:
>>> On 11/10/2013 12:42 PM, Benjamin Thaut wrote:
>>>> Am 08.11.2013 20:32, schrieb Walter Bright:
>>>>  > It looks pretty good, except I have serious reservations about the
>>>> -lib switch proposed behavior:
>>>> I'm glad you like the proposal.
>>>>
>>>>  >
>>>>  > 1. It's too blunt. A user could conceivably want to export some
>>>> symbols and not others. This is all or nothing.
>>>> A user is already able to control which symbols are exported and which
>>>> are not by using the "export" attribute. ...
>>>
>>> Using the export attribute on some member exports the entire module
>>> info. If I understand this right, the module info will contain
>>> information also about non-exported members of the module and therefore
>>> even non-exported members will be accessible from outside. Is this
>>> correct?
>>
>> AFAIK the module info only contains information about the (shared)
>> module constructors and destructors.  And no, non exported symbols will
>> not be acessible because the neccessary accessors are not generated for
>> them (at least on windows).
>
> What about Object.factory?

That would obviously work. But why would you want to restrict that for 
shared libraries? Its not restricted for static libraries either. And 
esentially a shared library should behave exactly the same as a static one.


More information about the Digitalmars-d mailing list