ADL
Cauterite via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 2 09:37:34 PDT 2016
On Friday, 2 September 2016 at 12:15:25 UTC, Manu wrote:
>
The only problem I have with this feature is that it would lead
to implicit-importation, which is a totally foreign concept in D,
and I would assume a design choice to not support it.
import bob : S;
S s;
// implicit `import bob : f;` for this statement:
f(s);
Is this an acceptable feature? Perhaps; my main concern is that
it can be very difficult to work out where this `f` symbol is
coming from. If you see the only import statement is `import bob
: S;` then you'd naturally assume that the `f` being called here
is not `bob.f`.
It's nice to learn this term "argument dependent lookup" though.
I've spent a lot of time thinking about this feature, but never
realised it had a name (and I never realised any languages
supported it).
More information about the Digitalmars-d
mailing list