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).
  • ADL Manu via Digitalmars-d
    • Re: ADL David Nadlinger via Digitalmars-d
    • Re: ADL Dicebot via Digitalmars-d
    • Re: ADL Steven Schveighoffer via Digitalmars-d
    • Re: ADL Cauterite via Digitalmars-d
    • Re: ADL Walter Bright via Digitalmars-d
      • Re: ADL Manu via Digitalmars-d
      • Re: ADL Walter Bright via Digitalmars-d
        • Re: ADL Stefan Koch via Digitalmars-d
          • Re: ADL Walter Bright via Digitalmars-d

Reply via email to