Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75558 invoked from network); 31 Aug 2013 17:57:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2013 17:57:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.177 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.177 mail-ie0-f177.google.com Received: from [209.85.223.177] ([209.85.223.177:52602] helo=mail-ie0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/82-55332-0AE22225 for ; Sat, 31 Aug 2013 13:57:53 -0400 Received: by mail-ie0-f177.google.com with SMTP id e14so5461591iej.22 for ; Sat, 31 Aug 2013 10:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=nfUmh21qAgyxqW46CItEANsGbEupYpRC4wNLHXhbhDM=; b=qnaQCZiYN/SJrb0VsLjSrzC+jDdUqSgQwHhSw33MIqsd36fEuIZMbYBw8w7GjkQ/xS 42SPOE3zj2upADWxiB37Xgz2yaUZvxwdqzJX9WdXMHO0OUFympzXiCQw99m2nxJvq97N sqsEf/mZSX0tZLergvIy5Oe3g+tMYPr6UxccE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=nfUmh21qAgyxqW46CItEANsGbEupYpRC4wNLHXhbhDM=; b=Vds8FkuxLejmstvdssTijYjx+8nfD3TS99FlyscOove7UExgciTLCsNnWZcADizhs6 a+GMIVLqxwZFIddWI6QcQ/8fsPF90BM716a0ZbCzBO3BWdqUsNqmf0P3LgR0zlMW4DfG CxblXMCE2wT1a/nyNfppoBjc2cOe5CLy2v58yQ7OWzYSc1l9Q74BukvFBt8x0TGnBGss yMwaHmz4EtLRwxEVzcb/buk4aNlpV29kRQ7yrhIUDEXFhMdnFifeRZzRAMAQrg8mebHY IaDHrygqkTGiLSrPLo6CNszBTKlfe1uHH7/3lblU3NenYH+0RyWhtLCa9fD6KijoHrvY t87Q== X-Gm-Message-State: ALoCoQluuylUCP4SyUhb7vFLEdamWje7H51bY/HJ6xSaKUf1IvIE9/gmlh40zyk1V1WsMznM4xFR X-Received: by 10.42.37.11 with SMTP id w11mr36201icd.56.1377971870109; Sat, 31 Aug 2013 10:57:50 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.169.5 with HTTP; Sat, 31 Aug 2013 10:57:29 -0700 (PDT) In-Reply-To: References: Date: Sat, 31 Aug 2013 10:57:29 -0700 X-Google-Sender-Auth: PrkoedulrJhilmgOcjLb16DYgLg Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Argument unpacking From: aharvey@php.net (Adam Harvey) On 30 August 2013 08:23, Nikita Popov wrote: > The syntax it introduces looks as follows: > > $db->query($query, ...$params); Somebody was going to do this, and it's going to be me. Sorry. We were doing so well. I don't like the ellipsis. I could just about deal with it for the variadic RFC, since it's at least not worlds away from C++ (and there are other precedents for it, as you noted), but it looks really weird to me as the splat operator. It looks like you're hesitant to call the function or ashamed of $params rather than unpacking something. I know there's a symbol soup issue for by-ref variadic arguments, as you mentioned in the RFC, but I think that's an unusual enough use case that * is still the better option =E2=80=94 it doesn't break the flow = of the code as much as a three character operator, and while it's no more visually intuitive than ..., it does have the advantage of being what Python and Ruby used. I'm raising this in this thread because I'm more concerned about the visual impact of it here, but obviously whatever we use as the operator for one is what we should use for the other, assuming both RFCs are accepted. Adam, who is wincing as he sends this at the likely subthread that will ens= ue.