Generality creep
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Mar 28 18:30:51 UTC 2019
On Thu, Mar 28, 2019 at 07:12:36PM +0100, ag0aep6g via Digitalmars-d wrote:
> On 28.03.19 18:04, Andrei Alexandrescu wrote:
[...]
> > It seems to me going with these is the right thing:
> >
> > * Input ranges are copyable and assignable, and have pointer
> > semantics (all copies refer to the same underlying position, and
> > advancing one advances all others).
> >
> > * Forward ranges are copyable and assignable, but distinct copies
> > refer to distinct positions in the range such that advancing one
> > does not advance the others.
> >
> > * We don't support other semantics.
>
> Are you going to actually change the range definitions in that way?
> Are you saying that I should wait until then with fixing range issues
> in Phobos?
>
> I'd expect those new definitions to be years away from becoming
> reality. It doesn't seem wise to leave bugs open today just because
> you have vague plans for fundamental changes in the distant future.
The only way I can see this happening is if we start a new iteration of
Phobos, like std.v2.* where these fundamental changes can be done in a
way that isn't totally disruptive to existing code. There would have to
be a migration path from the current Phobos so that existing code can
gradually move to the new APIs.
Implementing these changes directly in the current Phobos is going to
break SO much code it will make Walter & Andrei's stance on stabilizing
the language completely laughable.
(OTOH, I would welcome something like std.v2.*, where we can reverse
those decisions that in hindsight were poorly made, like autodecoding.
And getting rid of subpar modules like std.xml (and incorporating
Jonathan's dxml in its place).)
T
--
Almost all proofs have bugs, but almost all theorems are true. -- Paul Pedersen
More information about the Digitalmars-d
mailing list