Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68793 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 782 invoked from network); 31 Aug 2013 21:38:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2013 21:38:00 -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.160.41 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.160.41 mail-pb0-f41.google.com Received: from [209.85.160.41] ([209.85.160.41:33064] helo=mail-pb0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/87-55332-73262225 for ; Sat, 31 Aug 2013 17:37:59 -0400 Received: by mail-pb0-f41.google.com with SMTP id rp2so3252086pbb.0 for ; Sat, 31 Aug 2013 14:37:56 -0700 (PDT) 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:date :message-id:subject:from:to:cc:content-type; bh=Zv/zufsRkUuLbNBISkL/GKCJzAxjoqmAI5v38Y7UDVo=; b=Ipxj8wJ5nOEqofQGfvWnJA0gpSa3PZFMCe8ur0egl8SjRkD6or1tSsv1wkHh1d7Cd9 wOrQiAs1/VBtc8RL3oxyDEiX4jda7SKVLFj9PElq7IQLPH+nAD0gyr47cvL1AMTFV1rS qS4siPulZhvrkZCU2QGDlUryFO8Q+5bfg0E3J+0Uhnunfsks5OsLR7cp0YidlnY33Z5B 2M3wZ5iiwZXgolfW++EoZaiT3Aemb2iFj6sq1QlDfUrUbUULPn8CiVViJ8/iTDtYh5Gs gaT0pdtb+L3+Hs6ywss97aNtLZEhBwm3wGjQ4pOov4licFBuwOgCJVwvYKx9PokAI+Qq /a2Q== X-Gm-Message-State: ALoCoQlKMNPPRMKgNSkxVtt2fDD6jR9XL9OsK/WK4FGSYcRgM4LMUQHbxL3mdbYXkOUsLLWAeIiI MIME-Version: 1.0 X-Received: by 10.68.212.37 with SMTP id nh5mr17402472pbc.16.1377985076783; Sat, 31 Aug 2013 14:37:56 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.24.33 with HTTP; Sat, 31 Aug 2013 14:37:56 -0700 (PDT) X-Originating-IP: [173.252.71.189] In-Reply-To: References: Date: Sat, 31 Aug 2013 14:37:56 -0700 X-Google-Sender-Auth: 3evslv1jA--bMkZWttyI25ruEgA Message-ID: To: Adam Harvey Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=e89a8ff1c35001ff0304e54527ca Subject: Re: [PHP-DEV] [RFC] Argument unpacking From: pollita@php.net (Sara Golemon) --e89a8ff1c35001ff0304e54527ca Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Big +1 from me, though as Stas pointed out, multiple unpacks in a single call don't really work with PHP parameter typing, so I'd make that use an error. On Sat, Aug 31, 2013 at 10:57 AM, Adam Harvey wrote: > 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 =97 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 > ensue. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8ff1c35001ff0304e54527ca--