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.
      • Re: ADL Walter Bright via Digitalmars-d
      • Re: ADL Walter Bright via Digitalmars-d
    • Re: ADL Andrei Alexandrescu via Digitalmars-d
    • Re: ADL Andrei Alexandrescu via Digitalmars-d
    • Re: ADL Ethan Watson via Digitalmars-d
      • Re: ADL Walter Bright via Digitalmars-d
        • Re: ADL Ethan Watson via Digitalmars-d
  • Re: ADL Tobias Müller via Digitalmars-d
    • Re: ADL Andrei Alexandrescu via Digitalmars-d
      • Re: ADL Tobias M via Digitalmars-d
        • Re: ADL Andrei Alexandrescu via Digitalmars-d
          • Re: ADL Tobias M via Digitalmars-d
          • Re: ADL Andrei Alexandrescu via Digitalmars-d
          • Re: ADL Tobias Müller via Digitalmars-d
          • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
    • Re: ADL Manu via Digitalmars-d
    • Re: ADL Andrei Alexandrescu via Digitalmars-d

Reply via email to