Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85279 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70855 invoked from network); 20 Mar 2015 12:26:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 12:26:10 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.51 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.213.51 mail-yh0-f51.google.com Received: from [209.85.213.51] ([209.85.213.51:35524] helo=mail-yh0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/FE-25408-1E11C055 for ; Fri, 20 Mar 2015 07:26:09 -0500 Received: by yhim52 with SMTP id m52so10610330yhi.2 for ; Fri, 20 Mar 2015 05:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iaRG5JKuwmYTMTQEYlQyqjTNRx4jmJz7CSvIonpUZj4=; b=TRt4zKX5DJzC3UvqDSyz9MDhW0KMs5PF4EMpFZ5EL1sW6RFBCUAgH2Ep6zBb9+q9qS wi2E5U72u/yq1vlcicxddJ98hz6AbSeDGMY11vtM1XXVnTiMIevRSQapPQvCPyhXVIoN 1V9AJc6AImahvQQka9bsnW13+rq9VOy6RqwN335vyr/DD1TU1txfsBfq+i6IFXS+zn6j wJ1t4OSDxZ4RuJndaHVk4Q/QgHzH8ivlEs2/9G9Wy106S5nA7JUcfQ6IW2GUXpzd8w+3 AdwgUEP1M47ChPzbJljrI4Aj1kMWV/9GDbITk/INW8on36aQ07iwyckwNFa+wgbRAeib kcjA== MIME-Version: 1.0 X-Received: by 10.52.106.35 with SMTP id gr3mr10915308vdb.78.1426854366088; Fri, 20 Mar 2015 05:26:06 -0700 (PDT) Received: by 10.52.177.7 with HTTP; Fri, 20 Mar 2015 05:26:06 -0700 (PDT) Received: by 10.52.177.7 with HTTP; Fri, 20 Mar 2015 05:26:06 -0700 (PDT) In-Reply-To: References: <550B39AA.2090706@garfieldtech.com> Date: Fri, 20 Mar 2015 12:26:06 +0000 Message-ID: To: Alex Bowers Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a1133e2c2a3143d0511b76b8a Subject: Re: [PHP-DEV] RFC - Array slice syntactic sugar From: leight@gmail.com (Leigh) --001a1133e2c2a3143d0511b76b8a Content-Type: text/plain; charset=UTF-8 On Mar 20, 2015 11:40 AM, "Alex Bowers" wrote: >> >> I've tried implementing python style slice on both strings and arrays in >> >> the past (I don't seem to have an existing branch with it in any more >> though it seems). The biggest problems I hit were regarding the syntax, the >> functionality itself worked. > > > If you've got a link to your messaging thread, I'd love to read it. Thanks > >> Colons caused problems with ternary operators in the lexer, and I had an >> issue with commas too, but I forget what it was. Of course these might have >> been resolvable, but I didn't put too much effort into it. > > > Could this not be mitigated by adding a new token like T_COLON to be used to match this use case? The only thing I could find is: http://chat.stackoverflow.com/transcript/11?m=15926856#15926856 If your branch is available on github let me know, more than happy work on it with you. --001a1133e2c2a3143d0511b76b8a--