Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92300 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40220 invoked from network); 14 Apr 2016 14:25:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2016 14:25:04 -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.65 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.65 mail-pa0-f65.google.com Received: from [209.85.220.65] ([209.85.220.65:32954] helo=mail-pa0-f65.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/F1-25796-F38AF075 for ; Thu, 14 Apr 2016 10:25:04 -0400 Received: by mail-pa0-f65.google.com with SMTP id vv3so6954486pab.0 for ; Thu, 14 Apr 2016 07:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=L5j3x7NcLpdu3hDtwMwP+MnFKm3Y5x0QKlsQS37UzlU=; b=T9uPyfA4DiNQNBWadQkG8qQIE2uBCTGJJceky/S6UGrvHl9ZY0pxtjC5/KfL7ZYcuz xHZnyRBL4AsKZ/B+tXFxhBxoTM7q5ypsG2JjX0Ihn3Fv18itS7xkn4BoD/ZhIQ2a9DWg tSeQkaLiDDw+Jmsp6u9CgMYwxxCeuXNcJR3UY2CNeUEjgRHgH88fHhkkq3Sai5bLiTEq xTT/SCv41SVf4yT2bGIeQzPn4Kdn2NxLf2tfZFv5iPCV0B+alTMlmdDnCAz2fQ6QPqCd 2RuClMeZGcTr0C7kMnmABn/9cYxVWeiKA+5+qHsUeUIFN5a7D+ZfvTeuwejZTOCQokdv TBlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=L5j3x7NcLpdu3hDtwMwP+MnFKm3Y5x0QKlsQS37UzlU=; b=I15yosWFUqfFvZBKufDnK65uKn0w9bsTDud/En2pYZDfDIjz+NlG5v8plukALe4Xm7 mUoccRhJGfD9dghK1E4rc/OfBUMnztatW4nfLl3jKmmaq7GJbkr8DR7DNHuV2wSOaty5 5I3NyXER6pYGli67jTIaxLl8u8TTMHiB2FtzmobPgM6DC+gbTUCo8f8oJdhCMOMu8uFh WrGXRLHIE/Msh0ujag6tf7uLftxmtcKip8PRLulFl3zI0oB9da45v7kfEet3QYZ9vkF+ 5cLrYZrKlVgolEpJ4TxVbbSImpicIqmT5UUu1P4JK+l8ipKOiBzLsK9b6h89mTydLEzB LFjA== X-Gm-Message-State: AOPr4FXPbVfeYOogzfYqeeODwr7CaIrnPPK7TpNeAMpQT2iuW57bQKoe1psS4NpTZwbfGeNOsuTEpajhsey5gg== MIME-Version: 1.0 X-Received: by 10.66.232.4 with SMTP id tk4mr21689851pac.103.1460643900876; Thu, 14 Apr 2016 07:25:00 -0700 (PDT) Received: by 10.66.163.232 with HTTP; Thu, 14 Apr 2016 07:25:00 -0700 (PDT) In-Reply-To: References: Date: Thu, 14 Apr 2016 08:25:00 -0600 Message-ID: To: Derick Rethans Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Union Types From: morrison.levi@gmail.com (Levi Morrison) On Thu, Apr 14, 2016 at 3:12 AM, Derick Rethans wrote: > On Wed, 13 Apr 2016, Levi Morrison wrote: > >> As alluded to in an earlier email today[1] I am now moving the Union >> Types RFC[2] to the discussion phase. The short summary of the RFC is >> that it permits a type declaration to be one of several enumerated >> types. For example, this is a potential signature for a multi-type map >> routine: >> >> function map(callable $f, Array | Traversable $iterable); > > I think what I am missing in the RFC is behaviour with scalar (weak) > typehints, and which type the variable in a class would be converted to. > Take for example: This is not missing in the RFC; see the section called Weak Scalar Types in Open Issues. However, it does not propose a solution. I have been assured by a few people that it is possible and it is just something that needs worked out.