Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86493 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31303 invoked from network); 5 Jun 2015 06:00:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2015 06:00:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yoanlin93@gmail.com; sender-id=softfail Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.3 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.3 plane.gmane.org Received: from [80.91.229.3] ([80.91.229.3:47630] helo=plane.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/E1-12998-EEA31755 for ; Fri, 05 Jun 2015 02:00:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z0kfk-0006gE-Ie for internals@lists.php.net; Fri, 05 Jun 2015 08:00:05 +0200 Received: from 114-42-185-84.dynamic.hinet.net ([114.42.185.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Jun 2015 08:00:04 +0200 Received: from yoanlin93 by 114-42-185-84.dynamic.hinet.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Jun 2015 08:00:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Fri, 5 Jun 2015 05:51:48 +0000 (UTC) Lines: 37 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 114.42.185.84 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36) Subject: Re: [PHP-DEV] [RFC] Argument unpacking From: yoanlin93@gmail.com (Yo-An Lin) 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. Cheers, c9s https://github.com/c9s