Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85321 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5126 invoked from network); 20 Mar 2015 19:56:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 19:56:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=jbafford@zort.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jbafford@zort.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zort.net designates 96.241.205.2 as permitted sender) X-PHP-List-Original-Sender: jbafford@zort.net X-Host-Fingerprint: 96.241.205.2 nova.zort.net Received: from [96.241.205.2] ([96.241.205.2:40114] helo=nova.zort.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/16-64120-57B7C055 for ; Fri, 20 Mar 2015 14:56:37 -0500 Received: from [10.0.1.2] (pulsar.zort.net [96.241.205.6]) (authenticated bits=0) by nova.zort.net (8.14.5/8.14.5) with ESMTP id t2KJuUgx009834 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 20 Mar 2015 15:56:30 -0400 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <550C6422.6080009@gmail.com> Date: Fri, 20 Mar 2015 15:56:30 -0400 Cc: Leigh , Alex Bowers , internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <23A888B3-4493-4720-A275-D820F8E07F58@zort.net> References: <550B5A81.1090706@gmail.com> <550B7189.4040608@gmail.com> <7486C296-7535-4633-AFE2-02E7BBC67BC5@gmail.com> <550C1176.9050307@gmail.com> <550C1AE4.8090607@gmail.com> <550C1EC3.8000106@gmail.com> <550C317E.8020508@gmail.com> <550C6422.6080009@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] RFC - Array slice syntactic sugar From: jbafford@zort.net (John Bafford) On Mar 20, 2015, at 14:17, Rowan Collins = wrote: > It doesn't work *with that syntax*, because -1 is a valid key, just as = $thing[0] can't mean "first value of array" because it already means = "value with key 0". That's why I propose a new syntax such as = $thing[@0], $thing[@-1], etc. I would just like to point out that the @ error suppression operator = operates on expressions. Unfortunately, that means that also using @ as = a slice operator makes the two ambiguous with each other in those = contexts. The concept itself can still work, but it=92d need a token = other than @. -John=