>> On 16 Mar 2015, at 11:16 pm, Pavel Kouřil <pajou...@gmail.com> wrote:
>> 
>> On Mon, Mar 16, 2015 at 1:04 PM, Dan Ackroyd <dan...@basereality.com> wrote:
>>> On 16 March 2015 at 11:49, Pavel Kouřil <pajou...@gmail.com> wrote:
>>> 
>>> Seriously, think about it for a while - when some setting that changes
>>> how code behaves was a good idea?
>> 
>> 
>> The problem is that there are two irreconcilable camps - some people
>> want weak STHs, other people want strict STHs.
>> 
>> This RFC gives both camps what they want, at the cost of having the dual 
>> mode.
>> 
>> 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.
>> 
>> 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.
>> 
>> 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.
>> 
>> cheers
>> Dan
> 
> 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 
statement, I'm guessing no, and that you think error handlers should not be 
used that way as they change the code's behavior in almost exactly the same 
manner?

> 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, nobody 
would notice the difference because strict code works in weak mode. In other 
words, there are no BC issues with removing the strict portion. 

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 have 
many options but to step through and manually run through every single entry 
point into your application and test/audit every code path, and the hope 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 mode. There's 
no global setting, there's no BC with removing it, and it's use is *extremely* 
easy to detect! 

Cheers,
David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to