Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76578 invoked from network); 18 Feb 2015 23:38:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 23:38:22 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:18014] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/50-08593-D6225E45 for ; Wed, 18 Feb 2015 18:38:22 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 8D8B84B018C; Thu, 19 Feb 2015 00:37:58 +0100 (CET) Reply-To: To: "'Patrick ALLAERT'" , "'Sara Golemon'" Cc: "'PHP internals'" References: In-Reply-To: Date: Thu, 19 Feb 2015 00:38:16 +0100 Message-ID: <03aa01d04bd3$f8330420$e8990c60$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKz6wpj8b81mnwJq1LfxWbU4ZJyQgJsy61hAk54JfYBfn6ee5r9/VAw Content-Language: fr X-Antivirus: avast! (VPS 150218-2, 18/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Scalar Type Hints v0.4 From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Patrick ALLAERT [mailto:patrickallaert@php.net] > > My point is that it potentially imposes new warnings on foreign = code. >=20 > Eureka :) >=20 > That's what happened when I introduced the "Array to string = conversion": > lot of people complained about it and many frameworks had to fix = various > issues where it happened under the hood (e.g.: with array_diff() on > multidimensional arrays). >=20 > My point is that the same is true when adding E_NOTICE, E_WARNING, > E_DEPRECATED,... to the error_reporting: it might prevent libraries to = work > correctly (read: without extra PHP errors). >=20 > Why can't strictness follow that path? Because strictness is not the overall objective the PHP language is = aiming to. If it was the case, your mechanism would be fine, but = deprecating ZPP conversion would be simpler and fine too. This is = definitely not the same case as generating a notice on array to string = (and why did you generate a notice instead of E_DEPRECATE, we would be = rid of this crap now). That's what I hate in this 'weak' vs 'strict' terminology. It makes = implicit that 'strict' is the natural future and improvement of 'weak'. = That's absolutely not the case as 'weak' mode is not as negative as name = suggests, and 'strict' is not so positive either. So, you may stop = considering that the natural path for 'weak'-typed software is to = migrate to strict types. When we decide encouraging migrating to strict mode with a deprecation = on ZPP conversion, I hope I'll be far away... > PS: your feedback makes me feel it would be; even more; a viable = option :) Fine. But may I remind you the so-called great benefit you underlined in = your post is totally wrong and shows total ignorance of the difference = between casting and ZPP conversion rules which, IMO, is a fundamental = pre-requisite before laughing at people working on this. Regards Fran=C3=A7ois