Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82888 invoked from network); 4 Nov 2014 18:14:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 18:14:25 -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 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:45516] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/3D-06676-F7719545 for ; Tue, 04 Nov 2014 13:14:23 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so14229741wgh.15 for ; Tue, 04 Nov 2014 10:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=JU9Wq3DyE4k1sMftVSZ0LWJwtV+N+TRXRiemXEEUz6E=; b=OxZ/W7EPgpe1AI+0XJmqB0okIdh5ap/83/E1ybYW+x+aKO9TLHuO+Hv3reGlIEzYl0 POSrKdjerB/KZuvX5C0TaAUzTfQ8loTLt+8jIzwFGAzkmoKsk5DOEGSt/aKIhxr0XXvg gtmZfT1i0+wL+PE1pfkj8YF4OsEJsjpS5JDofQpkSqstwu1Vk2NWKXpc1TFSVoEIzUG3 MdqEb8uY4IFY9CnyFi2rzfm31JxSX41doYnYRjxRH5wS8h3c9iTDBd5cla8J1WzS1dee wCgIzyBzB1+N0nkcj26yWYhNBUCumSW1rSBXnud3J0DyASy/v9EyA83Jh3BpI0ftrv9Q A8GA== X-Received: by 10.181.8.98 with SMTP id dj2mr25853256wid.70.1415124860245; Tue, 04 Nov 2014 10:14:20 -0800 (PST) Received: from android-1c899c96c2ec6bf.config (5751a74b.skybroadband.com. [87.81.167.75]) by mx.google.com with ESMTPSA id v10sm1854501wiy.21.2014.11.04.10.14.18 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 10:14:19 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 04 Nov 2014 18:14:16 +0000 To: "internals@lists.php.net" Message-ID: Subject: Re: [PHP-DEV] [RFC] Additional splat operator usage From: rowan.collins@gmail.com (Rowan Collins) On 3 November 2014 22:45:11 GMT, Chris Wright wrote: >Good evening list, > >I'd like to open discussion a relatively simple and clear-cut RFC, >either >people will like it or they won't, there isn't a lot more to say here >than >what's in the RFC so please have a read. > >https://wiki.php.net/rfc/additional-splat-usage I like the concept with list-style arrays, but find the behaviour with regards associative arrays quite confusing. There's already a difference in behaviour between array_merge and + in this regard, and having a third way of writing the same thing isn't great - it would apparently be legal to write $foobar = [...$foo, ...$bar]; to simply merge two existing arrays. If anything, I think I would expect the keys of splatted arrays to be discarded, since it seems most natural to use this in a list context, but I can imagine always having to check in the manual. -- Rowan Collins [IMSoP]