Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92868 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29491 invoked from network); 28 Apr 2016 15:41:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 15:41:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:36491] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/30-28296-D0F22275 for ; Thu, 28 Apr 2016 11:41:02 -0400 Received: by mail-pa0-f42.google.com with SMTP id bt5so33432545pac.3 for ; Thu, 28 Apr 2016 08:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc; bh=FCAuWP2wQej8To656zNoAJNQj1LvOOR/zP8kyrNnINk=; b=ukJ1tz6Szv1rsPoKW1zEnAk9fjiZbdxJ0XYKi0bGqq2QLP5D5CsSxfsg1xBp/PITaw KQE3gmoE3ZxbneSFxowimW4QMdusC/3VoDTSSWfX0k/9MpFhCCJpOndIa19jiWqQQ2J6 zpkglgAO1MTgFYG+s2dve8/wmUCUQ3s0kH8XPijVw/4Lc7Km+qtLYPQznQmPvM5t/4wj LrGW5EGzh7/uGmp8Qp8DjNQZodmiZ+2GE5vMTtL3oJNF6GKVqAPmNfrgt5FbOR3GdJFm dGgOo+St2gbMGFDngq34ag6emByHDS5CZbbGu367bEjWrgc4X8MIon+Kgx3P9szd06es /Trw== 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:date:message-id:subject:from :to:cc; bh=FCAuWP2wQej8To656zNoAJNQj1LvOOR/zP8kyrNnINk=; b=fQxbujsAzlcenw3UOBK0Oa0mBOjiXER83/CUUkaGN9SCOoIe4IYHzbvdY+hBSAIpag CumfWj3OC7dIIk1uspQs6iVMbuUGLEuSZkujI133JfuF9G0GkTGHMPAIi805BEmP25iq 8+ZGWfR8TByHawl0FpNscELAk9YHKS1iF9U4sbsanoWG3pfZGjNFSSOKzRAzULDkjH1n FrCwP1+HzVApnXxXGqNooodmbrvQKkRqfpo8CcxD7xDuK6Mjr+kkD7n9MgvTn+n8Anpg RDerQ2DibdVciBzPjMiwy08R9itqLziAMlrsLwQcaZYsdEpQZ/nv0Kf6cDhxePWc4YnZ ybPg== X-Gm-Message-State: AOPr4FWwK7sFzfTgQi7k2egsmYMOioW8D7g5DYyiGdQ6kAlJLF/XsMS5BO62kvvxFZM5OHzmE9jzbkKcxH9AUw== MIME-Version: 1.0 X-Received: by 10.66.132.103 with SMTP id ot7mr21626127pab.27.1461858059247; Thu, 28 Apr 2016 08:40:59 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.66.132.79 with HTTP; Thu, 28 Apr 2016 08:40:59 -0700 (PDT) Date: Thu, 28 Apr 2016 09:40:59 -0600 X-Google-Sender-Auth: -Jc7fNXh-KbMJlUFnYOw0_kup9E Message-ID: To: internals Cc: Dmitry Stogov , Tom Worster Content-Type: text/plain; charset=UTF-8 Subject: Request to withdraw RFC's for nullable types for only return values From: levim@php.net (Levi Morrison) I have discovered through a [bug report][1] a case where having explicitly nullable parameters would be of value. You can theoretically change the default value in a sub-type, but in this case moving away from the default value of null breaks because the subtype no longer permits null. It is important to realize that we previously *allowed* this behavior since PHP 5.1 but was fixed in 7.0.6. If instead we had nullable types separately from default values of null this could change to: (or a short-form `?array $baz = []` if short-form passes) This preserves the ability to be null but changes the default value. Of course, there may be other code changes necessary to future-proof their code but there current code would now work without having to rewrite any method bodies (just signatures). In light of this I kindly request that RFCs that add nullable types for only return values be withdrawn. So that [Union Types][2] and [Nullable Types][3] can go forward unhindered. [1]: https://bugs.php.net/bug.php?id=72119 [2]: https://wiki.php.net/rfc/union_types [2]: https://wiki.php.net/rfc/nullable_types