Should we add `a * b` for vectors?

Dukc ajieskola at gmail.com
Thu Oct 5 11:39:46 UTC 2017


On Thursday, 5 October 2017 at 11:22:27 UTC, nkm1 wrote:

> It works, yes. The point is, additional methods in the struct 
> body, and free standing functions outside of the body, but in 
> the same module, is basically the same thing in D (I believe 
> Andrei already mentioned that).

But I meant extending the struct remotely from a different module.

> Ah, right. Well, anyway, that's not ADL by itself, since ADL 
> only looks in the namespace of the argument type (so it won't 
> find your extension methods if they're in some different 
> namespace/module).

Can well be, I don't know ADL precisely. Probably it should not 
be used as-is then, if at all.




More information about the Digitalmars-d mailing list