ADL
Tobias Müller via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 3 01:01:52 PDT 2016
On Friday, 2 September 2016 at 23:51:35 UTC, Manu wrote:
> This pattern seems to bite me every direction I turn when
> trying to
> write range or algorithm style code. C++ has ADL, and ADL
> works. I've
> never thought about this problem in C++, or had any problems
> with ADL.
IMO the root of this problem is that templates are *duck typed*.
All those problems wouldn't even exist with
concepts/traits/typeclasses (done right).
ADL is only an ugly hack.
And with "Design by Introspection" it only gets worse: If an
optional operation exists, but is not found because of unexpected
problems like these, it still compiles but you only get limited
functionality or bad performance.
More information about the Digitalmars-d
mailing list