Second Draft: Turn properties into first class accessors
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Thu Feb 6 04:14:14 UTC 2025
On 06/02/2025 4:34 PM, Paul Backus wrote:
> ...it also has the potential to remove observable side effects from a
> program, which is, of course, completely unacceptable.
In this case, what I am suggesting that yes, we must remove side effects
that involve an owning objects lifetime.
If we do not, it will not be equivalent to operator overloads in terms
of lifetime management and that is quite a bad situation to be in.
A ``@property`` method is for all intents and purposes is a borrowing
action. Even if it isn't returning by-ref. Although some people may want
to restrict this notion to only if you assign like this DIP proposes the
ability to do so.
More information about the dip.development
mailing list