On Wed, Jul 1, 2020 at 12:58 PM André Rømcke <andre.rom...@gmail.com> wrote:
> > "Attempting to pass a property value outside of allowed writable scope >> as a reference, results in an error." > > > ... we definitely shouldn't do this, because it goes against existing > language semantics. You can take a reference to a normal private property > (i.e. private get, private set), pass it outside the class and then modify > it. > > > > This was copied from some other source actually. I’m all for staying as > close as possible to how the language behaves on this, changing it should > be different RFC. > > Should I just remove this section or do you have suggestions for what we > need to specify when it comes references? > I think the only thing worth mentioning where references are concerned is that "$x =& $this->prop" is considered a write of $this->prop, not a read, so it is subject to the write visibility. But once the reference is acquired, visibility no longer factors into the behavior. Nikita