Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84851 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28665 invoked from network); 15 Mar 2015 16:45:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2015 16:45:22 -0000 X-Host-Fingerprint: 94.208.19.102 5ED01366.cm-7-1a.dynamic.ziggo.nl Received: from [94.208.19.102] ([94.208.19.102:27016] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/B1-29489-D17B5055 for ; Sun, 15 Mar 2015 11:45:18 -0500 Message-ID: To: internals@lists.php.net Date: Sun, 15 Mar 2015 17:45:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 References: <5504F34C.5090106@birkholz.biz> In-Reply-To: <5504F34C.5090106@birkholz.biz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 94.208.19.102 Subject: Re: [PHP-DEV] A plea for unity on scalar types From: peter@f-is.nl (Peter van Fessem) On 03/15/2015 03:49 AM, Dennis Birkholz wrote: > Hi together, > > Am 14.03.2015 um 14:37 schrieb Peter van Fessem: >>> If a dev turns a file that he or she wrote into strict mode, then that >>> only counts for that specific file. If you take over some code, then you >>> can remove the declare line. *none* of those things you'd be able to do >>> with ini settings. So don't shout out that nonsense FUD. >> >> It's equivalent to an ini setting in that it changes the behavior of the >> code based on something that is declared elsewhere. Obviously a declare >> statement in the top of the file is a lot better than an ini setting, >> but I think the principle is the same. > > that is simply not true. The principle is not the same. The principle is > roughly the same as with namespaces. If you are unsure, got to the top > of the file, finished. Ini-Settings are runtime-dependent so there is no > way to find out what the ini-setting will be beforehand. I don't think we disagree on this. I was only trying to say that both ini settings and declare statements influence behavior of other code, and that in both cases you have to put some effort into looking up the current value, but that is where the comparison ends. > > I think nobody will argue that namespaces are to complicated because you > can define the current namespace at the top of a file which than changes > the behavior of the file completely (which it does, somehow, by the way). I'd never argue that namespaces are complicated, but they, like every language feature, add a non zero complication to the language, whether you would use them yourself or not. Looking at the top of the file isn't a massive problem, but it is a small one. If I didn't see the value in namespaces, I'd prefer not to have them in the language at all (but I do, so I don't). I'm arguing against statements like: "Well if you don't like strict mode, don't use it.". It's not that simple. The fact that it exists adds a cost. > > Greets > Dennis > Thanks, Peter