Hi Dmitry On 4 November 2014 20:13, Dmitry Stogov <dmi...@zend.com> wrote:
> I like the idea, especially list($a, $b, ...$c) = ... > Looks like Prolog's [A, B | C] = ..., unfortunately it won't provide the > same semantic and performance. > Implementation needs to be reviewed, but I think it must not affect > existing opcodes. > > The list() usage is intentionally put outside the scope of this RFC, because what would be the correct behaviour is not quite so obvious - as Niki put it when we were discussing this initially, array_merge uses iterator-like behaviour, but list() uses ArrayAccess, it relies on specific indices being present, so it's not obvious what should be done with elements that are not within the bound of what list() would attempt to fetch. I am planning to put together another proposal for this, but it's still at the R&D stage - if people want to discuss it on-list at this stage I suggest starting a separate thread (I wasn't planning to until I have clarified my own ideas). I do need to explore the impact to to opcodes and opcache, and was planning to come to you to discuss this shortly. Thanks, Chris Thanks. Dmitry. > > On Tue, Nov 4, 2014 at 1:45 AM, Chris Wright <daveran...@php.net> 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 >> >> Thanks, Chris >> > >