Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44935 invoked from network); 6 Dec 2017 21:11:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Dec 2017 21:11:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.216.179 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.216.179 mail-qt0-f179.google.com Received: from [209.85.216.179] ([209.85.216.179:36421] helo=mail-qt0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/A3-24804-A1D582A5 for ; Wed, 06 Dec 2017 16:11:55 -0500 Received: by mail-qt0-f179.google.com with SMTP id a16so12520891qtj.3 for ; Wed, 06 Dec 2017 13:11:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ttExVn1bCRucPumVcG6PbOmSaA8jjlpg929R0fAfZTQ=; b=Up4Qp+wUIS1A207M84h3vY0SMgalsuGrbtuXJYcIWYg+FHzUmqZviiEMglRQi339xF cinUbKK5h3laHqJr6T2v7znmwTMY2NBUPwKefve/+yql+G/8fahl40FaeVyWEMrstfVG n3uKapHNIhe2PN+iEpaFNp9okattLNkpxRFm7xBbNm0JJLtTh5bZUgmUIzwLjAqnIzHS zo47MxnjTeQzOg2NWip4ayFQHiX/nbUCxKHiY5gOA079S3IS6M4hYYWOvKzYpxCGlcCB Fv/uisAnuR9lMP+QfyQFwtBsC7eEIMq5u8DYVBqhPiQJp5DejGPMHC20hwqu5Nn+lsit oXcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ttExVn1bCRucPumVcG6PbOmSaA8jjlpg929R0fAfZTQ=; b=p/tf735wMca9L2u+UWFg1EWsDvRYPTYsrx5VngnuBmSrQL+9GjMjBRXubsqZPOO++x wBwmgjNyQL9KoiV+wBxkwqgXYcgrtSfYFYwsajj4IT+sXGCrD1K+J6ynPt2jsuP8gZUH tRrpl9xvbH5xd4Gzn/2JB4wy1SG72f4Zgq841yF3whJdr+69Ldf5J3Cz2f5PqxN22jeB gsfeRraLz2AzTl1casPCQmmeDMTow6Z2HHdDKlQCaijII/BN31UIzC90jQ+wkKwcol57 Ffb6/cL962QPXtBYY3RDhvtKgSqTlMkDW6aqXcyqpmOxX0H921iXn4jpggXO10wv28kW ssEw== X-Gm-Message-State: AKGB3mKBL0BPjgF7VFsWORPi/yIlpHp5gqXICmwyL8Mc50QOkeKEhd3u frO9YkNq4ItduBfj2Kr8SVeV/r4MBDpttvHRmXXiPQ== X-Google-Smtp-Source: AGs4zMblmabVF0wSUR5+8yqJomzOFvDtnHXwi+CwgChnq3aEHHplXIUzwtkYoySQ7p6xV9NOWkm/71QkOqbZ6+J7UB4= X-Received: by 10.200.63.161 with SMTP id d30mr6616397qtk.311.1512594712267; Wed, 06 Dec 2017 13:11:52 -0800 (PST) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.12.158.145 with HTTP; Wed, 6 Dec 2017 13:11:51 -0800 (PST) X-Originating-IP: [71.251.16.204] In-Reply-To: References: Date: Wed, 6 Dec 2017 16:11:51 -0500 X-Google-Sender-Auth: gpKr-yAphpzXCKDDNZ4sx-qwulM Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Explicit call-site send-by-ref syntax From: pollita@php.net (Sara Golemon) On Wed, Dec 6, 2017 at 2:49 PM, Nikita Popov wrote: > I'd like propose optional support for explicitly marking by-reference > argument passing at the call-site, in addition to the declaration-site: > > https://wiki.php.net/rfc/explicit_send_by_ref > > In short, while currently we have > > function byRef(&$ref) {...} > byRef($var); > > this proposal would also allow > > function byRef(&$ref) {...} > byRef(&$var); > > so that the use of by-reference passing is obvious without having to > consult the function declaration. > The way I understand this, it only provides a readability hint for the human, yes? As far as the compiler is concerned, you're either confirming what it already knows, or it's throwing an error because what you think will be pass-by-ref, won't be. I'm not strictly against it in terms of helping readability for humans, but that kind of information can also live in a docblock with nearly the same force and effect (modulo the warning when the hint is wrong). -Sara