Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95677 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64409 invoked from network); 5 Sep 2016 21:09:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2016 21:09:28 -0000 X-Host-Fingerprint: 90.212.141.121 unknown Received: from [90.212.141.121] ([90.212.141.121:5962] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/EA-45301-80FDDC75 for ; Mon, 05 Sep 2016 17:09:28 -0400 Message-ID: <08.EA.45301.80FDDC75@pb1.pair.com> To: internals@lists.php.net References: Date: Mon, 5 Sep 2016 22:09:24 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 90.212.141.121 Subject: Re: [PHP-DEV] Missing reflection info about strict types? From: ajf@ajf.me (Andrea Faulds) Hi Nikita, Nikita Popov wrote: > As I see it, the issue here is really not how to figure out whether a file > uses strict_types, the issue is how you mix strict_types=1 and > strict_types=0 code in a single file. This is also my assessment. > Back when this feature was introduced, we decided not to allow this kind of > mixing, as it seemed prone to causing a mess and use-cases seemed doubtful. > Given the issue Symfony is experiencing, we should reevaluate this > decision. Imho it's not good if there are some things you simply *cannot* > express in a single file. I think it was things like this that made me initially allow having multiple strict_types declarations in a file. But that was changed later. Maybe we could allow it, but only with the block syntax, much as we do with namespaces? i.e.: declare (strict_types=1) { } declare (strict_types=0) { } Or we could allow any number of non-block strict_types declarations if we wanted. I don't know. -- Andrea Faulds https://ajf.me/