Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93276 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75607 invoked from network); 12 May 2016 13:46:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2016 13:46:15 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:42368] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/3F-28272-52984375 for ; Thu, 12 May 2016 09:46:14 -0400 Received: (qmail 20637 invoked by uid 89); 12 May 2016 13:46:10 -0000 Received: by simscan 1.3.1 ppid: 20625, pid: 20634, t: 0.0803s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 12 May 2016 13:46:10 -0000 To: internals@lists.php.net References: <573232DB.8030209@lsces.co.uk> <573308EC.70502@lsces.co.uk> <57346ABE.1070509@lsces.co.uk> <6dabc30a-7b4b-d71c-5a64-4005fd622a2e@gmail.com> Message-ID: <57348922.4060101@lsces.co.uk> Date: Thu, 12 May 2016 14:46:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <6dabc30a-7b4b-d71c-5a64-4005fd622a2e@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC][VOTE] Nullable Types From: lester@lsces.co.uk (Lester Caine) On 12/05/16 13:38, Rowan Collins wrote: > Now let's say the author of the something function decides to use the > new nullable type hint: > > function something(?Bar $bar) {} > something(new Bar); // OK > something(); // Error: Missing required parameter > something(null); // OK > > None of your code will be calling something(null) yet, because it was > previously an error. So you now have an *extra* way of calling the > function, but you don't need to change any existing usages. I'm sorry to be dragging this out, but some of this stuff IS getting more and more difficult to untangle! The key element *I* of cause am miss reading is the (Bar ...) which is a type hint. That will not exist in any of the code prior to ? and that is the key to what is being discussed. No type hint ... no change? If someone 'improves' a third party library by adding type hints then this is were the using code needs to be checked? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk