On Wednesday, 29 April 2020 at 12:23:11 UTC, Simen Kjærås wrote:
Of course, nothing stops us from defining our own front, popFront and friends that combine the two approaches above:

[...]

We could conceivably add these to std.range.primitives (probably adding some constraints first), and suddenly UFCS ranges are possible! (I am as of yet not convinced that we should, though)

--
  Simen

This is basically what C++ calls "argument-dependent lookup." Discussion about adding this sort of thing to D has come up before on the forums [1], and iirc Walter has generally been opposed to it. If it were to be added as a library feature, it would probably have to be opt-in.

[1] https://forum.dlang.org/post/mailman.123.1472818535.2965.digitalmar...@puremagic.com

Reply via email to