Re: [RFC] Explicit call-site send-by-ref syntax
| From: | Rowan Collins | Date: | Tue, 30 Jul 2019 12:34:48 +0000 |
| Subject: | Re: [RFC] Explicit call-site send-by-ref syntax | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106344@lists.php.net to get a copy of this message | ||
On Tue, 30 Jul 2019 at 11:28, Nikita Popov <nikita.ppv@gmail.com> wrote:
> With that in mind, I don't see an issue with reusing the previous
> call-time pass-by-ref syntax here. The & at the call-site still means that
> the value is going to be passed by refrence (or error), so it's not like
> someone who was around during the call-time pass-by-ref times would
> misunderstand what the code does based on their prior knowledge.
>
> The only concern I see here is the emotional issue: Bringing & back as a
> call-site annotation is an admission that the original migration of by-ref
> passing has been badly botched: Yes, you removed those & at the call-site
> for nothing. Yes, you shouldn't have been forced to do that!
>
> Mistakes happen and hindsight is 20/20. But we should own up to those
> mistakes.
>
I think that's a reasonable summary. Could you add a short section to the
RFC just acknowledging that history, and clarifying that this functionality
is effectively a subset of the previously removed feature, but without its
problems?
You're right that it's more of an emotional reaction than a rational one,
and shouldn't necessarily be a show-stopper IF we agree the proposed
behaviour is a big enough gain.
Regards,
--
Rowan Collins
[IMSoP]