DIP66 - Multiple alias this

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 12 05:34:25 PDT 2014


On 10/12/2014 06:28 AM, Walter Bright wrote:
> On 10/11/2014 3:42 AM, Jacob Carlborg wrote:
>> On 2014-10-11 00:52, Walter Bright wrote:
>>
>>> I like the C++ rule that says that access control is not considered for
>>> name lookup. I know it makes for some annoying results, but the
>>> simplicity of the rule makes it much more understandable.
>>
>> I'm not so sure about that. Perhaps it makes it more understandable for a
>> language designer. But not for a user. You try to call a function but
>> you get a
>> conflict with a private symbol. The user will get frustrated thinking:
>> "stupid
>> compiler, of course I want to call the public function".
>
> The theory is that simpler rules are better than complex rules, even if
> the simpler rules aren't always ideal.
>

Public symbols conflicting with private symbols are not just not ideal, 
they are a major PITA. The procedure for resolving ambiguities using 
alias introduces new private symbols itself!


More information about the Digitalmars-d mailing list