Updated DIP22 - Private symbol visibility

Martin Nowak code at dawg.eu
Sat Dec 21 13:09:44 PST 2013


On 12/21/2013 09:18 PM, Timon Gehr wrote:
> On 12/21/2013 08:29 PM, Martin Nowak wrote:
>> On Saturday, 21 December 2013 at 17:41:32 UTC, Timon Gehr wrote:
>>> Adding a private symbol to an overload set can break 3rd party code
>>> with these rules.
>>
>> Yes, this is understood, but it seems like a good tradeoff when compared
>> to the alternative where overload resolution depends on look-up origin.
>> The latter could easily break generic code and simple refactorings could
>> introduce subtle bugs.
>> ...
>
> I think both options are similarly undesirable.

Mixed protection in overload sets are pretty rare.
So we just need to find an acceptable solution to deal
with them without breaking valid use-cases.
I can hardly come up with any use-case but the constructor example though.



More information about the Digitalmars-d mailing list