ADL

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 5 14:27:55 PDT 2016


On 9/5/2016 6:34 AM, Andrei Alexandrescu wrote:
> ADL would not apply here because it looks up only names in the same module as
> the type.

It would work in C++ because any piece of code can insert more names into any 
namespace. Inserting names into a namespace violates about every principle of 
encapsulation I can think of, and it just ain't worth it.


> It doesn't sound like a good idea. This kind of lookup that collects names from
> various places and holds an auction is fraught with Byzantine failures. Good
> lookup is regular and predictable.

I agree.


More information about the Digitalmars-d mailing list