From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Return by reference
Date: Mon, 18 Dec 2017 16:41:54 -0600
Date: 2017-12-18T16:41:54-06:00 [thread overview]
Message-ID: <p19g7j$k1m$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 4d13b387-b813-449f-93b1-850822560578@googlegroups.com
"Mehdi Saada" <00120260a@gmail.com> wrote in message
news:4d13b387-b813-449f-93b1-850822560578@googlegroups.com...
> Not like they were omnicient, but people in ARG certainly had at least
> some reasons to provide a "clunky" mechanism ?
Surely. Every mechanism that we tried ended up simply regressing the
problem -- there still was a non-user-defined dereference involved. And that
had to be controlled, lest one be able to make long-lived copies of the
dereferenced access type. It turned out that access discriminants have the
right lifetime to do the control, and making the type with an access
discriminant controlled gives the necessary hook. So it was much less change
than a new kind of function return that really didn't solve the problem
anyway.
Dmitry's delegation scheme would have worked, I guess, but such things can't
replace assignment because they don't make sense for discriminant-dependent
components. So you'd lose the assignment syntax, or have a horrible wart in
the way it works.
Randy.
next prev parent reply other threads:[~2017-12-18 22:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 14:38 Return by reference Jere
2017-12-17 14:57 ` Dmitry A. Kazakov
2017-12-18 0:51 ` Mehdi Saada
2017-12-18 8:18 ` Dmitry A. Kazakov
2017-12-18 10:47 ` Mehdi Saada
2017-12-18 12:16 ` Dmitry A. Kazakov
2017-12-18 22:41 ` Randy Brukardt [this message]
2017-12-18 22:33 ` Randy Brukardt
2017-12-19 1:29 ` Jere
-- strict thread matches above, loose matches on Subject: below --
1999-11-01 0:00 Brian Rogoff
1999-11-02 0:00 ` Robert A Duff
1999-11-02 0:00 ` Brian Rogoff
1999-11-03 0:00 ` Lutz Donnerhacke
1999-11-03 0:00 ` Brian Rogoff
1999-11-04 0:00 ` Lutz Donnerhacke
1999-11-06 0:00 ` Brian Rogoff
1999-11-07 0:00 ` Lutz Donnerhacke
1999-11-04 0:00 ` Robert A Duff
1999-11-03 0:00 ` Matthew Heaney
1999-11-03 0:00 ` Brian Rogoff
1999-11-03 0:00 ` Matthew Heaney
1999-11-02 0:00 ` Lutz Donnerhacke
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox