Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85056 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30899 invoked from network); 16 Mar 2015 14:08:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 14:08:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.45 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.220.45 mail-pa0-f45.google.com Received: from [209.85.220.45] ([209.85.220.45:34831] helo=mail-pa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/AB-03331-2D3E6055 for ; Mon, 16 Mar 2015 09:08:18 -0500 Received: by pabyw6 with SMTP id yw6so65984717pab.2 for ; Mon, 16 Mar 2015 07:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:from:subject:date:to; bh=H5VLd/OO1+yZz77p0Ungjq4FcONt26G6wBctv83D/OU=; b=MkxUrPmV9MlSIAf8DH7JAN3/uaQG8MNDdfD0WeEVjcu28NSam/hGjeVWofodC0Or4k yw6ZJB8FILXOsthuV0gP58Xti1M+mtuA73IazZCiuPuyL4PDw6+p7YdrtUo0NpyqtBhu A9Wsb7XkOPvDQzeGosGaOjndiFZ4OnB9e74NUBq58X3RcnkuONYNAwQu0yqLiUDog8mT COhLC7JTo8Rm3SyBTUUcAa4ItYGqtOr3aJbYru9I6hOV3HbPw3HXXgzVLGRhn2jqvj5m RNymKmCswKTh0H+NAQPY9HtQj+WkiqlsEGkcEj7Fwb//wsNoO1toRoB144AUcogvejOI L1Mw== X-Received: by 10.70.30.225 with SMTP id v1mr13083772pdh.104.1426514895343; Mon, 16 Mar 2015 07:08:15 -0700 (PDT) Received: from [10.128.170.41] (pa49-199-2-168.pa.vic.optusnet.com.au. [49.199.2.168]) by mx.google.com with ESMTPSA id x1sm17582039pdr.17.2015.03.16.07.08.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Mar 2015 07:08:14 -0700 (PDT) References: <55066F07.80308@birkholz.biz> <5506794B.8090008@birkholz.biz> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Message-ID: <034E5D70-C0E3-412B-A18E-ECFF3033773F@gmail.com> Cc: Dan Ackroyd , Derick Rethans , Pierre Joye , PHP internals , Dennis Birkholz X-Mailer: iPhone Mail (11D257) Date: Tue, 17 Mar 2015 01:08:09 +1100 To: =?utf-8?Q?Pavel_Kou=C5=99il?= Subject: Re: [PHP-DEV] About declare(strict_types = 1) From: davidkmuir@gmail.com (David Muir) >> On 16 Mar 2015, at 11:16 pm, Pavel Kou=C5=99il wrote= : >>=20 >> On Mon, Mar 16, 2015 at 1:04 PM, Dan Ackroyd wro= te: >>> On 16 March 2015 at 11:49, Pavel Kou=C5=99il wrote:= >>>=20 >>> Seriously, think about it for a while - when some setting that changes >>> how code behaves was a good idea? >>=20 >>=20 >> The problem is that there are two irreconcilable camps - some people >> want weak STHs, other people want strict STHs. >>=20 >> This RFC gives both camps what they want, at the cost of having the dual m= ode. >>=20 >> I personally would prefer a single mode, with strict STHs but I can >> see that would piss off the other camp. And so to me, this RFC even >> with the ickiness of the setting, is an an acceptable cost to giving >> both sides what they want. Oh, and people who don't want to use scalar >> type hints at all, can still continue to not use scalar type hints, >> and their code will continue to keep working. >>=20 >> Anyone who is voting no, isn't doing so because they are missing out >> on a feature, they're doing it to block other people from getting what >> they want in PHP, which is just a terrible way to vote. >>=20 >> And if the strict camp are wrong and strict scalars are just not used >> by a large proportion of the PHP community, it would be trivial to >> remove support for the strict mode in a future version of PHP, as all >> code that runs in strict mode, will automatically work in weak mode. >>=20 >> cheers >> Dan >=20 > I can't speak for anyone who voted, but personally, if I could vote, I > would voted "no" - not because "I don't want to block people from > getting what they want", but because I sincerely think that having ANY > setting that changes code's behavior is bad in the long run (and that Do you use an error handler that converts notices into exceptions? By your s= tatement, I'm guessing no, and that you think error handlers should not be u= sed that way as they change the code's behavior in almost exactly the same m= anner? > removing the feature might not be really easy, once people realize > that the feature is really bad, as people realized with safe_mode and > register_globals after few years). Removing the feature is trivial! A search / replace across the code base can= do it, and it could be disabled at the engine level. For working code, nobo= dy would notice the difference because strict code works in weak mode. In ot= her words, there are no BC issues with removing the strict portion.=20 Can people stop comparing it to register globals? Have you ever tried to fix= a codebase that relied on it? It is impossible to detect! You really don't h= ave many options but to step through and manually run through every single e= ntry point into your application and test/audit every code path, and the hop= e you catch everything. It was a global setting, removing it was a *huge* BC= break, and its use was undetectable. None of which is the case with dual mo= de. There's no global setting, there's no BC with removing it, and it's use i= s *extremely* easy to detect!=20 Cheers, David=