Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92319 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89023 invoked from network); 14 Apr 2016 21:46:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2016 21:46:28 -0000 Authentication-Results: pb1.pair.com header.from=fsb@thefsb.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=fsb@thefsb.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thefsb.org designates 173.203.187.75 as permitted sender) X-PHP-List-Original-Sender: fsb@thefsb.org X-Host-Fingerprint: 173.203.187.75 smtp75.iad3a.emailsrvr.com Received: from [173.203.187.75] ([173.203.187.75:59791] helo=smtp75.iad3a.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/54-64966-2BF00175 for ; Thu, 14 Apr 2016 17:46:27 -0400 Received: from smtp18.relay.iad3a.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp18.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 7347E280247; Thu, 14 Apr 2016 17:46:24 -0400 (EDT) X-Auth-ID: fsb@thefsb.org Received: by smtp18.relay.iad3a.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id D4BCB2802DE; Thu, 14 Apr 2016 17:46:23 -0400 (EDT) X-Sender-Id: fsb@thefsb.org Received: from [10.0.1.2] (c-66-30-62-12.hsd1.ma.comcast.net [66.30.62.12]) (using TLSv1 with cipher DES-CBC3-SHA) by 0.0.0.0:465 (trex/5.5.4); Thu, 14 Apr 2016 17:46:24 -0400 User-Agent: Microsoft-MacOutlook/14.6.2.160219 Date: Thu, 14 Apr 2016 17:46:22 -0400 To: php-internals , Fleshgrinder Message-ID: Thread-Topic: [PHP-DEV] [RFC] Nullable Return Type Declaration References: <570FD463.9060205@fleshgrinder.com> In-Reply-To: <570FD463.9060205@fleshgrinder.com> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Nullable Return Type Declaration From: fsb@thefsb.org (Tom Worster) On 4/14/16, 1:33 PM, "Fleshgrinder" wrote: >On 4/14/2016 6:35 PM, Levi Morrison wrote: >>I can appreciate that you want only the restricted union with null. >> However, I do not see the point of disallowing it for parameter types >> >My guess is that this RFC only wants to get it for return because it >might be an easier vote? Hi Richard, That wasn't really my intent. I tried to set out my argument contra nullable param type in the RFC and elaborate it in my answer to Levi, which I hope you read. My attitude to programming reversed since 10 years ago. I used to prefer to have all the options and be allowed to exercise my judgement. But over those years I had to remain responsible for most of my code, which led to a blinding conversion. Now I am so acutely aware of how likely I am to write bugs that I more often than not want the language to get smaller. My sense is that nullable params won't turn out to be one of the good parts, in the Crockford sense. Something|null return, otoh, is so established as a convention I can't imagine getting away from it. I'm aware that some people won't understand my point of view. If that's still the case, ask again and I'll try a different answer. Tom