Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42267 invoked from network); 5 Jun 2015 09:20:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2015 09:20:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:32874] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/03-12998-EC961755 for ; Fri, 05 Jun 2015 05:20:15 -0400 Received: by wiwd19 with SMTP id d19so14707832wiw.0 for ; Fri, 05 Jun 2015 02:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=RvntDUIs3zDyp173xYZ7gVB7a3CnQkrPvAvojNdIBCU=; b=q0i+/OHkUJTQ5XkTwrgCilezI5IYSsYwJBEgRWlJ6XeSva4sqrEJ0e3UmDozbYBF37 q2OiAjedIcxDKBUg1Tq19DYd4U8dxW2ejYmxBmGyCEJHXDep5UpoT9WsYw7Ok4yftW2y 8653pXy6/DMM7s9KJb82uYnWfmqLE0VS5kiE83AXtP8frTheU5m1cZyPNEEpZ3xGbyMA dshlyzCX+hgDff9tyUu05AWJiiSquwZG+v4aWhukueVbwpYsUyIGGPnHiOx1Q4wzkZy8 A8/R04s3eAZTv3TMlzpVypBdmVh3Ubw325eiR89dcMVPBGop4/9nYq33sV3nJAngVDZT 1eJw== X-Received: by 10.194.83.70 with SMTP id o6mr4772747wjy.44.1433496012003; Fri, 05 Jun 2015 02:20:12 -0700 (PDT) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id lz17sm2335560wic.24.2015.06.05.02.20.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 02:20:11 -0700 (PDT) Message-ID: <5571697F.1080502@gmail.com> Date: Fri, 05 Jun 2015 10:18:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Argument unpacking From: rowan.collins@gmail.com (Rowan Collins) Yo-An Lin wrote on 05/06/2015 06:51: > Laruence php.net> writes: > >> On Fri, Aug 30, 2013 at 11:23 PM, Nikita Popov gmail.com> >> wrote: >>> Hi internals! >>> >>> This RFC proposes to add a syntax for argument unpacking: >>> >>> https://wiki.php.net/rfc/argument_unpacking >>> >>> Basically, this is the "complement" of the variadics RFC: It is not about >>> declaring variadic functions, but about calling them. >>> >>> The syntax it introduces looks as follows: >>> >>> $db->query($query, ...$params); >> seems so weird and ugly.. >> >> -1 > I totally agree.. the syntax design doesn't look quiet right. it isn't > readable and ugly. > > Since it's unpacking the arguments from the caller, the "..." should be put > after the $params. e.g. > > $db->query($query, $params...); > > the above approach is also used in Go. Not sure why you've picked this up now, but the mail you're replying to is from nearly two years ago, and the syntax in question was accepted, and released as part of PHP 5.6.0 in August 2014. The documentation can be found here: http://php.net/functions.arguments#functions.variable-arg-list So it's far too late to change the syntax, even if we had a better reason than "it looks nicer to me with the ... the other side of the name". Regards, -- Rowan Collins [IMSoP]