Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92261 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33390 invoked from network); 13 Apr 2016 19:57:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2016 19:57:45 -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.44 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.44 mail-pa0-f44.google.com Received: from [209.85.220.44] ([209.85.220.44:33946] helo=mail-pa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/07-26321-8B4AE075 for ; Wed, 13 Apr 2016 15:57:44 -0400 Received: by mail-pa0-f44.google.com with SMTP id ot11so37367315pab.1 for ; Wed, 13 Apr 2016 12:57:44 -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:date:message-id:subject :from:to; bh=SVgqUeZd1xEppTqvNojOMemKLPKNS/C7ApCz/yEpOyg=; b=gvmwTZxg7FsTHFYPTncaRCTuvXh7NZoL+A/7GFqk03c7lZXxVmuA3jKDFx5rv0Vqx3 hp6Fg6bnusIIv66l5eCVRYB64W/Y35qEIXPxwgqmVFIRS4AAb7QhyfdeGyzNIDUfO6WV +K4wbhgnTxoknYuw6Ajc4GlHQJgu8y7qdANuxkk/x08UWvaKk7ydFuz+/RIpXDyIyDKT gNXGAOIAsSMcZVgMsf4vIgwwSmY2x1DK4GaegQs4cJ6NNFAYY6Y0CL3WiwqEAfoqFLHV kXdjI93UHIzMtPstHd7ui7+tOgF0KiJHbC8oaX5YmRJhHvNWhMsg5bUUVJYV9l+WCTC5 fAAg== 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:date :message-id:subject:from:to; bh=SVgqUeZd1xEppTqvNojOMemKLPKNS/C7ApCz/yEpOyg=; b=GBt/hXG/xnmotAD5WEa8L4lQc3yyRLTLmWGlz/OeGCeY04/BDkyKKJ3r0gLYRsEREw i1vb7yyv4vzp36fhzbDMX821CIr+NsacaO3VQn24rqgVggS6t70T2TwO+oGJSB2EDrRO pTG8SdEi6Ixc8jyrn9tEr63J5b/yryCTYJV7Yp7wjOqbyqeYrXPdxQfr7DhNjhf7Kzzh JNeFfd2MSCYT0DV8Sk3X2qXu3PqE7uUTbFEHqbgThbu8x/gGTs3o76xxBqAZupyHKzw0 GVRdxXEC6TJZukb3afHMT70f1+HA1Kn1y5dTl2C4z0kkiHLmvv4LrfaJqXS624GYrRcj iIkQ== X-Gm-Message-State: AOPr4FWFWejMbzh8wFMTkTaJOhjq420gOEKi7pn/h12col/18qy7vK+Xk7Eaq63olRonHMZ81bIE64gCpA3FmQ== MIME-Version: 1.0 X-Received: by 10.66.174.134 with SMTP id bs6mr15347990pac.53.1460577461640; Wed, 13 Apr 2016 12:57:41 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.66.163.232 with HTTP; Wed, 13 Apr 2016 12:57:41 -0700 (PDT) In-Reply-To: <570E99AC.3090804@fleshgrinder.com> References: <570E99AC.3090804@fleshgrinder.com> Date: Wed, 13 Apr 2016 13:57:41 -0600 X-Google-Sender-Auth: 04B_VVwUqGoHHFl_lth_fJ0Me1A Message-ID: To: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: levim@php.net (Levi Morrison) On Wed, Apr 13, 2016 at 1:10 PM, Fleshgrinder wrote: > Nothing to add other than +1, however, didn't you already write those? > > https://wiki.php.net/rfc/nullable_types > https://wiki.php.net/rfc/union_types > > Or is this just an announcement that these will be finalized now? > > Btw. I am in favor of having the question mark as a suffix and not as a > prefix because it is more readable and more natural to type. > > function fn(string? $str): bool?; > > Declare a function with the name fn that takes a string argument that is > nullable which will return a bool or null. > > That is exactly how I would think about the above while writing and > reading. :) > > -- > Richard "Fleshgrinder" Fussenegger > I have written them but later they will be formally moved to Under Discussion and will create new threads for them here on the mailing list.