On Thu, 25 Jul 2019 at 13:32, Nikita Popov <nikita....@gmail.com> wrote:
> I think it can either go forward as-is, in that it constitutes the first > step towards bringing sanity to by-reference passing in the long term. > Hi Nikita, As I mentioned before, I think this RFC is 10 years too late: if this goes ahead, we'll be telling a lot of people "You know all those reference annotations you removed when you upgraded to PHP 5.4? You have to put them all back again now!" To be clear, forcing a parameter to be by-reference against the signature of the called function was a bad feature, and this proposal would have been better. But without a time machine, I think this will cause more confusion than it brings value. Adding "out" and "inout" keywords, as mentioned in "future scope", is a much more powerful change, won't require any opt-in modes or breaks to existing code, and would be looking forward rather than backward. It's hard to see how tweaking the meaning of "&" will lead us closer to that, making it feel more like "alternative" than "future". (For those without threaded mail clients, the RFC in question is https://wiki.php.net/rfc/explicit_send_by_ref Incidentally, the "Proposed for" on the RFC needs updating!) Regards, -- Rowan Collins [IMSoP]