Generality creep

ag0aep6g anonymous at example.com
Thu Mar 28 19:43:36 UTC 2019


On 28.03.19 20:24, Andrei Alexandrescu wrote:
> Changing the entire standard library to accommodate wackiness in 
> RefRange is a poor executive decision regardless. The recent changes 
> must be undone.

No one is arguing in favor of doing what I've in my PRs on the issue. 
Not even me.

I've started that endeavor, because the only tangible response I got 
when I asked what do do was from Jonathan M Davis who said: "it could be 
argued that generic, range-based functions simply shouldn't ever be 
assigning one range to another."[1]

If you prefer and approve removing RefRange.opAssign instead, I'm all 
for that.

Also note that Walter himself has done similar pull requests:

https://github.com/dlang/phobos/pull/6900
https://github.com/dlang/phobos/pull/6903

He uses constructors instead of "wonky" `move`, but the effect with 
regards to issue 18657 is the same: RefRange.opAssign is not called. If 
that's an acceptable way to make Phobos compatible with RefRange, that's 
also fine with me.


[1] 
https://forum.dlang.org/post/mailman.1557.1521939012.3374.digitalmars-d@puremagic.com


More information about the Digitalmars-d mailing list