Re: RFC - Array slice syntactic sugar
| From: | Leigh | Date: | Fri, 20 Mar 2015 10:43:21 +0000 |
| Subject: | Re: RFC - Array slice syntactic sugar | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85272@lists.php.net to get a copy of this message | ||
On 20 March 2015 at 10:38, Leigh <leight@gmail.com> 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.
>
> 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.
>
That said, I'm a little older and wiser than I was then, I'd still be
interested in looking at this. I'll try and come up with _something_ that
works over the weekend.