Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101293 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71230 invoked from network); 10 Dec 2017 13:13:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2017 13:13:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 84.19.169.162 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 84.19.169.162 mail.experimentalworks.net Received: from [84.19.169.162] ([84.19.169.162:39906] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/F1-53433-BD23D2A5 for ; Sun, 10 Dec 2017 08:12:59 -0500 Received: from kuechenschabe.fritz.box (ppp-46-244-178-212.dynamic.mnet-online.de [46.244.178.212]) by mail.experimentalworks.net (Postfix) with ESMTPSA id A1FD96A361; Sun, 10 Dec 2017 14:12:56 +0100 (CET) Message-ID: <1512911576.12039.8.camel@schlueters.de> To: Nikita Popov , PHP internals Date: Sun, 10 Dec 2017 14:12:56 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Explicit call-site send-by-ref syntax From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Mi, 2017-12-06 at 20:49 +0100, Nikita Popov wrote: > Hi internals, > > 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 > I would rather discourage usage of references. Since PHP 7 the cost of breaking cow isn't as expensive anymore, but receiving values by value and returning by value is more idiomatic imo. Using objects can be more efficient. johannes