Re: [RFC] Explicit call-site send-by-ref syntax
| From: | CHU Zhaowei | Date: | Fri, 08 Dec 2017 16:36:23 +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-101268@lists.php.net to get a copy of this message | ||
On Fri, Dec 8, 2017 06:16 PM, "lists@rhsoft.net" <lists@rhsoft.net> wrote:
>
>and it's much bader to use a not so long existed syntax which was now
>changed to a fatal error - just type "php call-by-reference" in google
>
I know most people of this list using and contributing to PHP for a very long time, but I want to
point out that the old "call-time pass-by-reference" was deprecated from php 5.3, which is
more than 8 years ago. People with modern framework and tools are not troubled by the old and
already removed syntax. The real trouble is I cannot figure out the parameter is passed by reference
or value unless I go to the defination of the method.
btw, I really googled "php call-by-reference", the latest page was post on 2012, 5 years
ago.
>> I know "references are the wrong tool for any job" is a belief held my some of
>> the community - I'm curious if out/inout parameters solve any of their concerns about
>> references?
>
>now because they are not bad because the syntax, they are bad fopr most
>usecases because you try to be smarter the PHP's copy-on-write but in
>most cases you won't
If you point is pass-by-reference is bad and stupid, then it's off-topic and I suggest you
should create a new RFC to abandon this feature. This RFC is aimed at making things more clear for
developers and static analyzers.