Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92366 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44127 invoked from network); 16 Apr 2016 10:10:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2016 10:10:58 -0000 Authentication-Results: pb1.pair.com header.from=bastian.schneider@commerce-plus.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=bastian.schneider@commerce-plus.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain commerce-plus.com from 74.125.82.45 cause and error) X-PHP-List-Original-Sender: bastian.schneider@commerce-plus.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:38720] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/81-32052-0BF02175 for ; Sat, 16 Apr 2016 06:10:57 -0400 Received: by mail-wm0-f45.google.com with SMTP id u206so62303383wme.1 for ; Sat, 16 Apr 2016 03:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=commerce-plus-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=HStBBPVNMChLABiApmwRl2IAZovtjdmumEB5CoySIHg=; b=Q8ppmisZKJ83jOg3giMJXjTLeZYuL7+AN8X2Pqv/TYplDk6zaDmVDRZs1C/2IDttwH qj09Z/DOEspnY+sk4coZk9UAslrNhO+8D35lb9S+UGGX0sd0J0Rbb5CjQvs6x1Nwmbus VPKTWVymXiF2hwbW8Fm8vA+SYoLbeNNCSo48aEubfQunedF9N++FElV7WPbs2kG5EYW8 SeHBb04Ka9k33zDqC7GlRRSfdMcqOgzbTc8ZgEMcA6E2uJ9Kx3T0XSnpZjtNnPxyFeuJ uhHZovrKIx8vq4af+m6yPZuil1RBhyiGUhhXyW7pI4lWMbB86V7QUrl3DeGmgQu4SZoJ Q4eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=HStBBPVNMChLABiApmwRl2IAZovtjdmumEB5CoySIHg=; b=ZkXG1eZFXGw/1pOsbjtcoaWXz4W4VuueaOcUK8eJZs7adVHqlJaOWKcddQ8IfjAXFw 0hyIAgVgDzYPWnB2WlhsXcp5ekobJaJS/YOogTnl2ooTa0vC1AiKdJORwAwZbCQmuc8n E6z33vX2SuSk5+WtMvcHUPLRdiSM04MILuDh30Ia6uBkQ/tRzH5GrUX1bFUtc6Au7EaJ LXEl1Ex1g0kzVYJ0Ys758MzZJc5OeNBs2dscZGU+0aOfuQ8Xb+iks872vQ0G8LGah2Yi 97/jpSLY83kLUQR1Ata/QqLMummC1iXbE0Lgmbb778D4sJ+a2JT49RypuUjhjC842GGZ iipA== X-Gm-Message-State: AOPr4FX22TS8VGiAHRp64ImnYwItXDewTX/mn5YAy/PDMF4hzW8KzPSJq2KqYQzCH33QE36/ X-Received: by 10.195.13.67 with SMTP id ew3mr26105690wjd.6.1460801453444; Sat, 16 Apr 2016 03:10:53 -0700 (PDT) Received: from [192.168.2.4] (ip5f5ab8dc.dynamic.kabel-deutschland.de. [95.90.184.220]) by smtp.googlemail.com with ESMTPSA id s6sm33850817wjy.31.2016.04.16.03.10.51 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 16 Apr 2016 03:10:52 -0700 (PDT) To: internals@lists.php.net References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> <570FD94F.90703@fleshgrinder.com> <570FE8A9.4020809@gmail.com> <20.53.29891.17401175@pb1.pair.com> <57110BCD.5030009@garfieldtech.com> <571124C2.9040606@gmx.de> <57112F31.8070209@garfieldtech.com> Message-ID: <57120FAF.7070602@commerce-plus.com> Date: Sat, 16 Apr 2016 12:10:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: bastian.schneider@commerce-plus.com (Bastian Schneider) Just a quick thought. I would prefer something like union Iterable { use array; use ArrayAccess; use Traversable; } function bla(Iterable $iterable) { foreach($iterable as $element) {} } Primitives like string, float, bool or int are not allowed in union. Only classes, interfaces and array. I doesn't see any benefit in combining string with int or int with float in one union. Do I overlook or missed anything?