Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25142 invoked from network); 13 Jun 2016 15:59:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2016 15:59:36 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.46 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.46 mail-pa0-f46.google.com Received: from [209.85.220.46] ([209.85.220.46:35569] helo=mail-pa0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/EE-12403-568DE575 for ; Mon, 13 Jun 2016 11:59:33 -0400 Received: by mail-pa0-f46.google.com with SMTP id hl6so47023166pac.2 for ; Mon, 13 Jun 2016 08:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=WWZTB/AE+ICMgQuQUQrc2z/iytfG4pGd8m2OvkSrI8U=; b=x64zEqI5CslIX2YiXICjHf28juriOPf+oFjP1UCYV33fcIw/2kAsgITLbygqe6VCJS HyACLwWT20o2/hBsyQKzL48Ntnlg3MuAt+ly2KwWFt6pgWQBdnnnr38LLUv7hwgsZfom JUz4SuPpCLztjF9fzU3gsHZtwhNwAutq+KRMfqEIsPZ73xlxWIqn9pVKOg0nfclAGYzm RsvteydlZ5QUakRovG9aaOCmJ5KOeOXRxBy4lmGbigwhb+RwYILodEdNU9IZLWxKHDlW 8BB1D2U/AwTa+tVOT2hmF6seLGq8YwOsIfe8A9cYaY8ZIbGIWIL+17yazK+LVaoegReM ESNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=WWZTB/AE+ICMgQuQUQrc2z/iytfG4pGd8m2OvkSrI8U=; b=VUm3sjbpx/tnl0cxxjFDDeJCSubBQYNTmG+DSPEsNzIPLyNgGPXIKLV96Mi08KYlns ns2pRl017xj589cqtZGKWgKM1EVq0h9KHFP7XNTdM3P0ev5b/Cb6570oZarKYXieuG3z LRMgxfrGcFV135qhXkmwUs7O4PUfft8io1cZlC7eeDRCfLTNhEbpgr5YffCVeKYE2I9U Fug5MLWBcfc1j1cUYS1pErGmHAu6QFpYNqXE5w7+wkzciKfLlAQTm/zJJDkhNf22fc4R CdoDqS4Gt7Hb3ywMYngmqsS+WEKl4ptN3IqKxNptPmuXuvVJt5loNY9dKtKRkPmNOsFU APUA== X-Gm-Message-State: ALyK8tJRu8WwwHeedvAu9NM50eUqurGcUw1EZwOhAMgEFy2NJYNEHg9FQqRxbwhTmkQl5vbipLaYo09oLAb2lw== X-Received: by 10.66.66.42 with SMTP id c10mr22763494pat.119.1465833570519; Mon, 13 Jun 2016 08:59:30 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.236.137 with HTTP; Mon, 13 Jun 2016 08:59:29 -0700 (PDT) In-Reply-To: <16ef864f-8378-1af3-ddfb-21dc583a4b4a@gmx.de> References: <8284FE1F-70EE-4DB6-A945-0C57A4C99DCC@trowski.com> <16ef864f-8378-1af3-ddfb-21dc583a4b4a@gmx.de> Date: Mon, 13 Jun 2016 09:59:29 -0600 X-Google-Sender-Auth: UOJrXSTfktf2xuq4p0PBvDyXY7I Message-ID: To: Christoph Becker Cc: Aaron Piotrowski , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC] Iterable From: levim@php.net (Levi Morrison) On Mon, Jun 13, 2016 at 5:42 AM, Christoph Becker wrote= : > On 11.06.2016 at 01:37, Aaron Piotrowski wrote: >> I would like to propose a new iterable pseudo-type that accepts both arr= ays and objects implementing Traversable. Values accepted by iterable can t= hen be used with foreach and yield from, or help to reduce type-checking lo= gic in general. >> >> Please review the RFC here: https://wiki.php.net/rfc/iterable > > Thanks, Aaron! I definitely like this idea (I'm not sure about the > details yet =E2=80=93 would have to thoroughly investigate), as it is app= arently > solving a long-standing issue, and is in my opinion a cleaner solution > than (explicitly) having to resort to a union type. My opinion is contrary: the union type is the cleaner solution as it does not require special casing machinery in the engine.