Copy Constructor DIP and implementation
Manu
turkeyman at gmail.com
Tue Sep 25 03:33:19 UTC 2018
On Mon, 24 Sep 2018 at 16:22, Jonathan M Davis via
Digitalmars-d-announce <digitalmars-d-announce at puremagic.com> wrote:
>
> On Monday, September 24, 2018 3:20:28 PM MDT Manu via Digitalmars-d-announce
> wrote:
> > 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!
>
> @implicit on copy constructors is outright bad. It would just be a source of
> bugs. Every time that someone forgets to use it (which plenty of programmers
> will forget, just like they forget to use @safe, pure, nothrow, etc.),
> they're going to have a bug in their program.
perhaps a rule where declaring a copy-ctor WITHOUT @explicit emits a
compile error...?
More information about the Digitalmars-d-announce
mailing list