Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85002 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16010 invoked from network); 16 Mar 2015 08:28:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 08:28:29 -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:33561] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/32-00492-C2496055 for ; Mon, 16 Mar 2015 03:28:28 -0500 Received: (qmail 32386 invoked by uid 89); 16 Mar 2015 08:28:25 -0000 Received: by simscan 1.3.1 ppid: 32380, pid: 32383, t: 0.0730s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.178.189.108) by mail4.serversure.net with ESMTPA; 16 Mar 2015 08:28:25 -0000 Message-ID: <55069429.7020000@lsces.co.uk> Date: Mon, 16 Mar 2015 08:28:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <55066F07.80308@birkholz.biz> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] About declare(strict_types = 1) From: lester@lsces.co.uk (Lester Caine) On 16/03/15 06:22, Xinchen Hui wrote: >> It's in the RFC: "Whether or not the function being called was >> > declared in a file that uses strict or weak type checking is >> > irrelevant. The type checking mode depends on the file where the >> > function is called." > my fault, I must oversight of reading this... If the third party library has been 'converted' to strict, and is expecting strict typing to pick up the sort of conversions that the strict camp want to protect against then there are handlers for that error, but if it is called from a situation where weak conversions are all that is being passed would it be necessary to add back in weak error handling as well if the library is not actually designed to handle those cases? I know all of this has been said a thousand times, but we do not CURRENTLY have type hinting, if projects are going to start relying on weak hinting or strict hinting, then is there any guarantee that there will not be new edge cases when mixing the two methods of working. Add in the fact that we do not HAVE to use it so the calling project may simply not be bothering about hinting at all? But now has to handle new errors which start when a library adds any hinting? -- 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