ADL

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 3 06:41:43 PDT 2016


On Saturday, 3 September 2016 at 10:11:05 UTC, Timon Gehr wrote:
>
> If ADL is done as a fallback, then it is only slower in those 
> cases where it is either actually used, or 
> __traits(compiles,...) is used to determine that some function 
> overload does not exist.

True.
Still it does complicate the implementation.

AFAICS the point of ADL is importing function definitions 
automatically if they are referenced, thereby practically 
circumventing the guarantees imports give you.

In particular : "I will only import what is in that module, and I 
will only transitively import what is imported publicly by this 
module"

now it becomes : "I will import what is in that module, 
transitively import public imports, and maybe more if a function 
called from that module requires it."

Please do correct me if my interpretation is wrong.
I haven't heard of adl before this post.


More information about the Digitalmars-d mailing list