Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14230 invoked from network); 5 Nov 2014 10:31:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2014 10:31:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.47 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.192.47 mail-qg0-f47.google.com Received: from [209.85.192.47] ([209.85.192.47:46748] helo=mail-qg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/80-10214-99CF9545 for ; Wed, 05 Nov 2014 05:31:54 -0500 Received: by mail-qg0-f47.google.com with SMTP id j107so11939919qga.34 for ; Wed, 05 Nov 2014 02:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=m0VgGVqNNm/Xor5BY1xxKh1kCyFuhSuhASjYqKZskY0=; b=UtPHAPpEGCSGZ/3MyNwp0vvB14yG6CF29KV6CTzy+f/kZjyTQMMDYBGi/zDCS38Fun hl/90Fyfir7s6zZdAeZFuxE6bQfLW628Hr6oTSnqyFZXINWEZYwntq1Qb96k7N5ji09I f1HiPie0mhysEkb98OB5EYATlQtX03wHe2P4hxXA1fPok4eaLEwuyHbpq/EFkSQfCx2d 8kU6uSKDkJFUebkQqt2B5WuBU04rSG9MRiwCEmM+/Aov3/LSbDyDXDaLJZSFR3yQVQWn eAnJ9qNBtW2rpq8Gt154S853TnShtW5CdZ3KN/ckY/7iIk1LF4vaacOWNBCmFbZTrZUU nRDw== MIME-Version: 1.0 X-Received: by 10.140.42.135 with SMTP id c7mr20684120qga.7.1415183510967; Wed, 05 Nov 2014 02:31:50 -0800 (PST) Sender: are.you.winning@gmail.com Received: by 10.140.239.194 with HTTP; Wed, 5 Nov 2014 02:31:50 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Nov 2014 10:31:50 +0000 X-Google-Sender-Auth: 8qGu9mEm8c9PbsSAjOqQrF2lM3U Message-ID: To: Dmitry Stogov Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1139838e769df505071a1694 Subject: Re: [PHP-DEV] [RFC] Additional splat operator usage From: daverandom@php.net (Chris Wright) --001a1139838e769df505071a1694 Content-Type: text/plain; charset=UTF-8 Hi Dmitry On 4 November 2014 20:13, Dmitry Stogov 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 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 >> > > --001a1139838e769df505071a1694--