Copy Constructor DIP and implementation

Manu turkeyman at gmail.com
Mon Sep 24 21:20:28 UTC 2018


On Mon, 24 Sep 2018 at 12:40, 12345swordy via Digitalmars-d-announce
<digitalmars-d-announce at puremagic.com> wrote:
>
> On Monday, 24 September 2018 at 17:34:58 UTC, Manu wrote:
> > On Mon, 24 Sep 2018 at 00:55, Gary Willoughby via
> > Digitalmars-d-announce <digitalmars-d-announce at puremagic.com>
> > wrote:
> >>
> >> On Sunday, 23 September 2018 at 02:40:15 UTC, Nicholas Wilson
> >> wrote:
> >> > It appears that @implicit has been removed from the
> >> > implementation [1], but not yet from the DIP.
> >> >
> >> > https://github.com/dlang/dmd/commit/cdd8100
> >>
> >> Good, It's not needed.
> >
> > @implicit is desperately needed (just not for copy
> > constructors!). Do you have confidence that an @implicit
> > proposal will happen if you all insist that it's removed here?
> > This is a great driving motivator to support @implicit's
> > introduction.
>
> If we are going to introduce the keyword/attribute implicit then
> it needs its own DIP. As of now, this DIP have a very weak
> justification for it.

I certainly agree; I'm fairly sure I produced the very first critical
comment on this issue when it first landed, which went like "@implicit
is a dependency and needs a dependent dip", which Andrei brushed off.
I still believe it's a separate feature, and it's a dependency for
this particular DIP, so that should come first... but here's the
thing; that's just not how dlang works around here.
We like the idea that there's process and structure, but there's not,
and you just need to be practical about maneuvering towards the goals
you want in the ways that manifest.

In this case, having @implicit is a very real and desirable goal, it's
been a sore hole in the language since ever... so anything that moves
it towards reality is preferable to nothing.
While I felt strongly about my conviction initially (that there should
be a dependent DIP), I realised that a much more useful and practical
position was to allow this dip to introduce @implicit implicitly
(heh)... that's a much better reality than waiting an addition year or
2 (if ever!) for the thing otherwise.

I encourage people to consider this holistically and consider the
practicality of allowing it, even thought it's not a strictly
principled in terms of process ;)

copy-ctor is good, @implicit is also good... we want both. Even though
copy-ctor is not strictly dependent on @implicit, allowing it will
satisfy that there's not a breaking change, it it will also
self-justify expansion of @implicit as intended without a separate and
time-consuming fight, which is actually the true value of this DIP!


More information about the Digitalmars-d-announce mailing list