On 9/5/16 4:41 PM, Jacob Carlborg wrote:
On 2016-09-05 15:28, Andrei Alexandrescu wrote:

Yah, make front a member please. It's in the same module so you're not
breaking any encapsulation anyway. -- Andrei

I just said:

"I thought one of the reasons for UFCS was to be able to make a type
support the range interface without modifying the type" [1].

And you replied:

"That is correct" [2].

And now you're saying that it should be a member?

That's the path of last resistance.

What if it's in the
different module?

D does not support one module to expand a type defined in another module with 100% transparency.

Or as it is for the built-in arrays, not possible to
add a member there.

That pattern is only possible with the restrictions and limitations of std.array.



Andrei
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Manu 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 Jacob Carlborg via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Jacob Carlborg via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Jacob Carlborg via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Lodovico Giaretta via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • [OT] local overloading (Was: Re: ADL... Timon Gehr via Digitalmars-d
  • Re: ADL Marc Schütz via Digitalmars-d
  • Re: ADL Timon Gehr via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Timon Gehr via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Jacob Carlborg via Digitalmars-d

Reply via email to