Generality creep
ag0aep6g
anonymous at example.com
Thu Mar 28 21:13:17 UTC 2019
On 28.03.19 21:05, Andrei Alexandrescu wrote:
> This is a sign things have gotten off the rail. Assignment should be
> accessible and have obvious semantics.
Let's get rid of RefRange.opAssign then. Then assignment of RefRange has
obvious semantics. RefRange.opAssign is not needed for RefRange to be
useful.
[...]
> RefRange is a cancer.
>
> Changing all data structures and algorithms to support it is the cancer
> going into metastasis.
Again, no one here is arguing for "changing all data structures and
algorithms".
> We must excise the cancerous tissue.
We can cut out the bad parts, but leave the useful core of RefRange
intact, can't we?
The useful core is: a range that wraps a pointer to another range in
order to achieve reference semantics. Often, a pointer to a range is
already a range, but not always. E.g., `int[]*` is not a range.
More information about the Digitalmars-d
mailing list