Hi

Am 2025-06-11 22:09, schrieb Andreas Hennings:
Calling __clone() afterward would mean the new properties would already be set and the old ones gone, contrasting existing behavior and thus users' expectations.

But in fact both of the following sentences are true:
- Currently, no further changes are applied to a cloned object after
__clone() is called.

This is only true to a very small extent, specifically for `public public(set) readonly` properties.

For non-readonly properties, the user could just write into the properties after cloning, for `protected(set) readonly`, the user can just overwrite `__clone()` and for `private(set) readonly` the class is in control.

Rowan already summarized that during the discussion in https://externals.io/message/127353#127389 and Volker confirmed that we agreed with that.

- Currently, no changes are applied to a cloned object before
__clone() is called.

Both of these statements can describe user expectations, but each of
them justifies a different version of the RFC.

Best regards
Tim Düsterhus

Reply via email to