Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106294 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84835 invoked from network); 25 Jul 2019 15:50:42 -0000 Received: from unknown (HELO mail-io1-f46.google.com) (209.85.166.46) by pb1.pair.com with SMTP; 25 Jul 2019 15:50:42 -0000 Received: by mail-io1-f46.google.com with SMTP id o9so97190926iom.3 for ; Thu, 25 Jul 2019 06:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=j3NKB6WYU5jWkKNRnWoq9M0jGYPWpdA+G0q7hrobZzM=; b=hi7BDSOGrAXKTw8Ik6/PY/cl3yVNZgOwrUvqSdKDwqpf9uAFaMpxo+74AI/QwyLkMM cnr1sFme3V+NHZOUhxrt/NrxS5/SLpVDJrtZWEeFztXSxB/XtG3CFWi8Bip0wlA5aNpz 9lOq01dbtZ7gVD8JtC0/DvlPbleviYbY4yGrdoyCdr8kmsA/d9y06TMLFSilSFoj+0D3 vXbyqQqa3oyxgi3OieEKDwkJ142/OmED0Gsi+dzXOZAeYMd5viBpef+SrSTxDw2doDMs GlHrNJOmY8S8M39PTD7Kyb2mSJ8LCMD+XLxBaYp0WrOoCboJQt/rJl/69IHT/Z/yh+bS FKMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=j3NKB6WYU5jWkKNRnWoq9M0jGYPWpdA+G0q7hrobZzM=; b=nMD/tqLEEEvqe5/QU6Ggaguk1F4cNT7uKK03QowmGaVD0+SJMxFeerzgJwiqLRipOh +sfU+KnVp5IuvCjR0FcWTY7ZEMNIJ6sJWbAi3xIJKhDIZCY9NldIGdeaK32UgT0LoHQ3 1CLByer/CY/A1xO/yBzBaPCglsmgxv54r9ghn453QV0qtUrqEG9MXfh4JCQZRDIUcBkH oqJ0XrXhXhPTf4zAh+p0hZzlRgBc93UC/iG0cc3K+Gtwqvoq+wuGMqmtc6lDlj8nMoo0 W/1Su7lxsAjDrbK0+MHQKCcL6AMMOkKF7ZrQOSDgSuwoRqn7BgfzX/YvMKkKNcuEZ/nb ChxQ== X-Gm-Message-State: APjAAAWEFaPSAyqDfxxygqxI5IY6texej/DhBl5NOCEbKZTjTq4DDd0U /S8ZM2lJ4EFJ3jBOki83wGMdigqxRLllKyRAzbZrrHSF X-Google-Smtp-Source: APXvYqx0L80i4QSnMUofsxuVRBN1m7v/UrRuKmgX2xE0ASWP/z6X93/IuleGbKUu9aqTrWAW4iLU0WNvuFhaX17C0QM= X-Received: by 2002:a6b:b214:: with SMTP id b20mr27158318iof.149.1564060460776; Thu, 25 Jul 2019 06:14:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 25 Jul 2019 14:14:09 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000002c028a058e813445" Subject: Re: [PHP-DEV] Re: [RFC] Explicit call-site send-by-ref syntax From: rowan.collins@gmail.com (Rowan Collins) --0000000000002c028a058e813445 Content-Type: text/plain; charset="UTF-8" On Thu, 25 Jul 2019 at 13:32, Nikita Popov 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] --0000000000002c028a058e813445--